diff options
author | Paul B Mahol <onemda@gmail.com> | 2021-08-25 22:36:32 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2021-08-25 22:48:23 +0200 |
commit | 507fdcd1b09deed0cfd274d6afb284a99963168f (patch) | |
tree | b13249c04b79e588e499bd12fa1dfafeb73efb68 /libavcodec/dnxhddec.c | |
parent | 2589060b92eeeb944c6e2b50e38412c0c5fabcf4 (diff) | |
download | ffmpeg-507fdcd1b09deed0cfd274d6afb284a99963168f.tar.gz |
avcodec/dnxhddec: ignore second flag for encoded field
And instead use previous field flag.
Fixes decoding files produced by non-compliant encoders.
Diffstat (limited to 'libavcodec/dnxhddec.c')
-rw-r--r-- | libavcodec/dnxhddec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index 41c72cdce6..d113c1db7b 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -193,7 +193,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, return AVERROR_INVALIDDATA; } if (buf[5] & 2) { /* interlaced */ - ctx->cur_field = buf[5] & 1; + ctx->cur_field = first_field ? buf[5] & 1 : !ctx->cur_field; frame->interlaced_frame = 1; frame->top_field_first = first_field ^ ctx->cur_field; av_log(ctx->avctx, AV_LOG_DEBUG, |