mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 06:42:03 +00:00
3bed78fdfd
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. |
||
---|---|---|
.. | ||
dec_video.c | ||
dec_video.h | ||
lavc_dr1.c | ||
lavc.h | ||
vaapi.c | ||
vd_lavc.c | ||
vd.h | ||
vda.c | ||
vdpau_old.c | ||
vdpau.c |