diff options
author | wm4 <wm4@nowhere> | 2013-11-28 13:34:56 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-11-28 15:20:33 +0100 |
commit | 3bed78fdfd425c4d5652c5811eb37d47a65d33cc (patch) | |
tree | 6320b11f8f6a543b58e281e46236ec983cd87894 /TOOLS | |
parent | e8677aa36333206f59fae610e9b94ad5d2c3c7e2 (diff) | |
download | mpv-3bed78fdfd425c4d5652c5811eb37d47a65d33cc.tar.bz2 mpv-3bed78fdfd425c4d5652c5811eb37d47a65d33cc.tar.xz |
video: add heuristic to prevent framedrop during hrseek if pts broken
Using --start with files that use DTS only, or which simply have broken
PTS timestamps, would incorrectly drop frames and possibly not execute
the seek correctly.
Add yet another heuristic to detect this. The intent is that --start and
hr-seeks in general should work correctly, but in order to keep things
fast, we still want to allow frame dropping during hr-seek if there are
no problems doing so. Do this by disabling frame dropping by default,
but re-enabling it if there are no problems found for a while. As a
consequence, --start might be somewhat slower, but normal user
interaction should remain as fast as before.
Note that there's something subtle about the added code: the
has_broken_packet_pts field is checked even before the first packet is
fed to dec_video.c, so the field must not be set to 0 right on start.
It's not initially set to 0 anyway, because the heuristic requires
decoding some images before enabling frame drop anyway.
Note 2: it's not clear whether frame dropping during hr-seek really
helps; I didn't benchmark it.
Diffstat (limited to 'TOOLS')
0 files changed, 0 insertions, 0 deletions