[Mplayer-cvslog] CVS: main/osdep timer-darwin.c,1.4,1.5

Nicolas Plourde CVS syncmail at mplayerhq.hu
Wed Oct 27 20:03:14 CEST 2004


CVS change done by Nicolas Plourde CVS

Update of /cvsroot/mplayer/main/osdep
In directory mail:/var2/tmp/cvs-serv1031/osdep

Modified Files:
	timer-darwin.c 
Log Message:
repace call to sleep_accurate to usleep which fix hang while using -cache option on osx

Index: timer-darwin.c
===================================================================
RCS file: /cvsroot/mplayer/main/osdep/timer-darwin.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- timer-darwin.c	4 Aug 2004 15:48:43 -0000	1.4
+++ timer-darwin.c	27 Oct 2004 18:03:11 -0000	1.5
@@ -32,20 +32,12 @@
 
 const char *timer_name = "Darwin accurate";
 
-/* the core sleep function, uses floats and is used in MPlayer G2 */
-float sleep_accurate(float time_frame)
-{
-  uint64_t deadline = time_frame / timebase_ratio + mach_absolute_time();
-
-  mach_wait_until(deadline);
 
-  return (mach_absolute_time() - deadline) * timebase_ratio;
-}
 
 /* wrapper for MPlayer G1 */
 int usec_sleep(int usec_delay)
 {
-  return sleep_accurate(usec_delay / 1e6) * 1e6;
+  return usleep(usec_delay);
 }
 
 




More information about the MPlayer-cvslog mailing list