[MPlayer-cvslog] r34857 - trunk/mplayer.c

reimar subversion at mplayerhq.hu
Sun Apr 15 13:09:17 CEST 2012


Author: reimar
Date: Sun Apr 15 13:09:17 2012
New Revision: 34857

Log:
Fix hang when video pts suddenly jumps to match audio pts.

This is a workaround for Debian issue Bug#668543.
It most likely is also a FFmpeg demuxer issue,
see https://ffmpeg.org/trac/ffmpeg/ticket/1213.

Modified:
   trunk/mplayer.c

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Sat Apr 14 18:55:53 2012	(r34856)
+++ trunk/mplayer.c	Sun Apr 15 13:09:17 2012	(r34857)
@@ -2080,6 +2080,19 @@ static void adjust_sync_and_print_status
                 ++drop_message;
                 mp_msg(MSGT_AVSYNC, MSGL_WARN, MSGTR_SystemTooSlow);
             }
+            if (AV_delay > 0.5 && correct_pts && mpctx->delay < -audio_delay - 30) {
+                // This case means that we are supposed to stop video for a long
+                // time, even though audio is already ahead.
+                // This happens e.g. when initial audio pts is 10000, video
+                // starts at 0 but suddenly jumps to match audio.
+                // This is common in ogg streams.
+                // Only check for -correct-pts since this case does not cause
+                // issues with -nocorrect-pts.
+                mp_msg(MSGT_AVSYNC, MSGL_WARN, "Timing looks severely broken, resetting\n");
+                AV_delay = 0;
+                timing_error = 0;
+                mpctx->delay = -audio_delay;
+            }
             if (autosync)
                 x = AV_delay * 0.1f;
             else


More information about the MPlayer-cvslog mailing list