[MPlayer-cvslog] r24843 - trunk/osdep/timer-darwin.c

ulion subversion at mplayerhq.hu
Tue Oct 23 02:06:08 CEST 2007


Author: ulion
Date: Tue Oct 23 02:06:08 2007
New Revision: 24843

Log:
Fix GetTimerMS() incontinuous return value bug caused by GetTimer() overflow on darwin. This bug will cause osd stuck on darwin.


Modified:
   trunk/osdep/timer-darwin.c

Modified: trunk/osdep/timer-darwin.c
==============================================================================
--- trunk/osdep/timer-darwin.c	(original)
+++ trunk/osdep/timer-darwin.c	Tue Oct 23 02:06:08 2007
@@ -61,7 +61,8 @@ unsigned int GetTimer()
 /* current time in milliseconds */
 unsigned int GetTimerMS()
 {
-  return (unsigned int)(GetTimer() / 1000);
+  return (unsigned int)((mach_absolute_time() * timebase_ratio - startup_time)
+                        * 1e3);
 }
 
 /* time spent between now and last call in seconds */



More information about the MPlayer-cvslog mailing list