[xiph-commits] r3049 - liboggplay/trunk/plugin

tahn at svn.annodex.net tahn at svn.annodex.net
Mon Jun 25 18:04:56 PDT 2007


Author: tahn
Date: 2007-06-25 18:04:56 -0700 (Mon, 25 Jun 2007)
New Revision: 3049

Modified:
   liboggplay/trunk/plugin/plugin_gui_mac.c
Log:
Fix for video frame rates that do not divide evenly into 1000; keep the playback_target time in 16.16.


Modified: liboggplay/trunk/plugin/plugin_gui_mac.c
===================================================================
--- liboggplay/trunk/plugin/plugin_gui_mac.c	2007-06-25 13:52:29 UTC (rev 3048)
+++ liboggplay/trunk/plugin/plugin_gui_mac.c	2007-06-26 01:04:56 UTC (rev 3049)
@@ -533,13 +533,13 @@
      * If offset ends up negative, we've already missed the deadline for
      * displaying the next frame, so we'll just drop it.
      */
-    playback_target += get_callback_period(info->oggplay_handle) >> 16;
-    offset = playback_target - cur_time;
+    playback_target += get_callback_period(info->oggplay_handle);
+    offset = (playback_target >> 16) - cur_time;
     drop_video_frame = (offset < 0);
 #ifdef TIMING_TRACE
     printf("\nv %d   a %6d    pt %6lld    ct %6lld    off %4lld    %s",
         td.frame_data.frame != NULL, td.frame_data.size,
-        playback_target, cur_time, offset, drop_video_frame ? "*" : "");
+        playback_target >> 16, cur_time, offset, drop_video_frame ? "*" : "");
 #endif
     if (drop_video_frame) {
       offset = 0;



More information about the commits mailing list