summaryrefslogtreecommitdiffstats
path: root/mpvcore/input/input.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-28 15:10:51 +0100
committerwm4 <wm4@nowhere>2013-11-28 15:20:33 +0100
commit5411fbdb2341433dfa3241034390c19c257ce57e (patch)
tree20f1651bc7e0dddb91bf9aa6e3809c03e635c4c1 /mpvcore/input/input.c
parentdc0b2046cdeb0bbf78e7012d9eafa29a2888b1ec (diff)
downloadmpv-5411fbdb2341433dfa3241034390c19c257ce57e.tar.bz2
mpv-5411fbdb2341433dfa3241034390c19c257ce57e.tar.xz
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.
Diffstat (limited to 'mpvcore/input/input.c')
0 files changed, 0 insertions, 0 deletions