video: remove AVI timestamps for dropped frames

Might possible improve A/V sync, although this is at best approximate.
(AVI is just fucked.)
This commit is contained in:
wm4 2016-02-04 15:28:25 +01:00
parent 363a225364
commit 6cbd7d6390
1 changed files with 5 additions and 1 deletions

View File

@ -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) {