Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-08-25 23:36:32 +0300
committerPaul B Mahol <onemda@gmail.com>2021-08-25 23:48:23 +0300
commit507fdcd1b09deed0cfd274d6afb284a99963168f (patch)
treeb13249c04b79e588e499bd12fa1dfafeb73efb68 /libavcodec/dnxhddec.c
parent2589060b92eeeb944c6e2b50e38412c0c5fabcf4 (diff)
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.c2
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,