diff options
author | wm4 <wm4@nowhere> | 2016-02-04 15:28:25 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-02-04 21:31:15 +0100 |
commit | 6cbd7d63902c88dc504d98f517b455d2f560f975 (patch) | |
tree | 0afeec7f22f6c44f5c82145fd1593f7c3086ffe8 /video | |
parent | 363a225364f334213b8a1bfb1e9bd77fccdd560e (diff) | |
download | mpv-6cbd7d63902c88dc504d98f517b455d2f560f975.tar.bz2 mpv-6cbd7d63902c88dc504d98f517b455d2f560f975.tar.xz |
video: remove AVI timestamps for dropped frames
Might possible improve A/V sync, although this is at best approximate.
(AVI is just fucked.)
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/dec_video.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c index b278cdfe82..ed0bfb825e 100644 --- a/video/decode/dec_video.c +++ b/video/decode/dec_video.c @@ -294,9 +294,13 @@ static struct mp_image *decode_packet(struct dec_video *d_video, MP_STATS(d_video, "end decode video"); + // Error, discarded frame, dropped frame, or initial codec delay. if (!mpi || drop_frame) { + // If we already had output, this must be a dropped frame. + if (d_video->decoded_pts != MP_NOPTS_VALUE && d_video->num_buffered_pts) + d_video->num_buffered_pts--; talloc_free(mpi); - return NULL; // error / skipped frame + return NULL; } if (opts->field_dominance == 0) { |