From 0e245b37523c9808f91827f64f4a62812d2c733e Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 6 Oct 2015 17:42:27 +0200 Subject: 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. --- video/decode/dec_video.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'video/decode/dec_video.c') diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c index 6752782645..384f1b2643 100644 --- a/video/decode/dec_video.c +++ b/video/decode/dec_video.c @@ -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); -- cgit v1.2.3