Mercurial > mplayer.hg
changeset 34769:8c1a27b26502
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.
author | reimar |
---|---|
date | Sun, 15 Apr 2012 11:09:17 +0000 |
parents | 47e03fa8a9d1 |
children | 401d1ceee52e |
files | mplayer.c |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mplayer.c Sat Apr 14 16:55:53 2012 +0000 +++ b/mplayer.c Sun Apr 15 11:09:17 2012 +0000 @@ -2080,6 +2080,19 @@ ++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