1
mirror of https://github.com/mpv-player/mpv synced 2024-11-14 22:48:35 +01:00

video: disable framedrop if avi-style timestamps are used

This can't be handled correctly at all. Other cases when the decoder
might drop a frame (such as completely failing to decode a frame) will
shift timestamps by a frame, and it can't be avoided.

While we could maybe find a better way to handle this with libavcodec's
main decoders, this seems to be much harder if it should work with
certain HW decoders, which don't passthrough the DTS field (such as
MMAL). Another problem are .avi files with b-frames. So just leave it
as it is.
This commit is contained in:
wm4 2015-10-06 17:42:27 +02:00
parent 6fb926a560
commit 0e245b3752

View File

@ -310,6 +310,9 @@ struct mp_image *video_decode(struct dec_video *d_video,
double prev_codec_pts = d_video->codec_pts;
double prev_codec_dts = d_video->codec_dts;
if (d_video->header->video->avi_dts)
drop_frame = 0;
MP_STATS(d_video, "start decode video");
struct mp_image *mpi = d_video->vd_driver->decode(d_video, packet, drop_frame);