diff options
author | wm4 <wm4@nowhere> | 2015-10-06 17:42:27 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-10-06 18:18:57 +0200 |
commit | 0e245b37523c9808f91827f64f4a62812d2c733e (patch) | |
tree | a188e9d78fe45bbcdcdf4e0aa8f1d32cc019f08a /video | |
parent | 6fb926a560328bc3e34de5e7529f44008262795e (diff) |
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')
-rw-r--r-- | video/decode/dec_video.c | 3 |
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); |