1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-21 07:16:56 +00:00

player: simple hack to make backstep code somewhat more robust

The hr-seek code assumes that when seeking the demuxer, the first image
decoded after the seek will have a PTS exactly equal to the demuxer seek
target time, or before that target time. Incorrect timestamps,
implicitly dropped initial frames, or broken files/demuxers can all
break this assumption, and lead to hr-seek missing the seek target.

Generally, this is not much a problem (the user won't notice being off
by one frame), but it really shows when using the backstep feature. In
this case, backstepping would simply hang.

Add a simple hack that basically forces a minimal value for the --hr-
seek-demuxer-offset option (which is 0 by default) when doing a
backstep-seek. The chosen minimum value is arbitrary. There's no perfect
value, though in general it should perhaps be slightly longer than the
frametime, which the chosen value is more than enough for typical
framerates.

Conflicts:
	mpvcore/player/playloop.c
This commit is contained in:
wm4 2013-11-28 15:10:51 +01:00
parent 38885269b3
commit 93518bc652