1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 06:42:03 +00:00
mpv/video/decode
wm4 3bed78fdfd 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.
2013-11-28 15:20:33 +01:00
..
dec_video.c video: add heuristic to prevent framedrop during hrseek if pts broken 2013-11-28 15:20:33 +01:00
dec_video.h video: add heuristic to prevent framedrop during hrseek if pts broken 2013-11-28 15:20:33 +01:00
lavc_dr1.c Attempt to fix build on older libavcodec versions 2013-11-23 22:08:18 +01:00
lavc.h video: move handling of container vs. stream AR out of vd_lavc.c 2013-11-23 21:40:51 +01:00
vaapi.c video: move struct mp_hwdec_info into its own header file 2013-11-23 21:26:31 +01:00
vd_lavc.c video: refactor PTS code, add fall back heuristic to DTS 2013-11-27 21:14:39 +01:00
vd.h cosmetics: rename video/audio reset functions 2013-11-27 21:14:39 +01:00
vda.c video: add vda decode support (with hwaccel) and direct rendering 2013-08-22 12:13:30 +02:00
vdpau_old.c Attempt to fix build on older libavcodec versions 2013-11-23 22:08:18 +01:00
vdpau.c video: move struct mp_hwdec_info into its own header file 2013-11-23 21:26:31 +01:00