summaryrefslogtreecommitdiffstats
path: root/video/decode/dec_video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-10-06 17:42:27 +0200
committerwm4 <wm4@nowhere>2015-10-06 18:18:57 +0200
commit0e245b37523c9808f91827f64f4a62812d2c733e (patch)
treea188e9d78fe45bbcdcdf4e0aa8f1d32cc019f08a /video/decode/dec_video.c
parent6fb926a560328bc3e34de5e7529f44008262795e (diff)
downloadmpv-0e245b37523c9808f91827f64f4a62812d2c733e.tar.bz2
mpv-0e245b37523c9808f91827f64f4a62812d2c733e.tar.xz
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.
Diffstat (limited to 'video/decode/dec_video.c')
-rw-r--r--video/decode/dec_video.c3
1 files changed, 3 insertions, 0 deletions
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);