From 269f271b7373091790be61fe38e37eb2c8cb98f8 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Wed, 9 Sep 2015 20:28:22 -0700 Subject: video: make --field-dominance set interlaced flag fixes #2289 --- video/decode/dec_video.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'video') diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c index 34b437aa52..f46d1c47ac 100644 --- a/video/decode/dec_video.c +++ b/video/decode/dec_video.c @@ -326,11 +326,13 @@ struct mp_image *video_decode(struct dec_video *d_video, return NULL; // error / skipped frame } - if (opts->field_dominance == 0) - mpi->fields |= MP_IMGFIELD_TOP_FIRST; - else if (opts->field_dominance == 1) + if (opts->field_dominance == 0) { + mpi->fields |= MP_IMGFIELD_TOP_FIRST | MP_IMGFIELD_INTERLACED; + } else if (opts->field_dominance == 1) { mpi->fields &= ~MP_IMGFIELD_TOP_FIRST; - + mpi->fields |= MP_IMGFIELD_INTERLACED; + } + // Note: the PTS is reordered, but the DTS is not. Both should be monotonic. double pts = d_video->codec_pts; double dts = d_video->codec_dts; -- cgit v1.2.3