History

avcodec/dnxhddec: ignore second flag for encoded field

And instead use previous field flag. Fixes decoding files produced by non-compliant encoders.

Paul B Mahol committed 5 years ago

Commit 507fdcd1 parent 25890601 file · +1 −1Browse files

Unified · Split

libavcodec/dnxhddec.c+1−1
@@ -193,7 +193,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame, · 192 unmodified lines
193193 return AVERROR_INVALIDDATA;
194194 }
195195 if (buf[5] & 2) { /* interlaced */
196− ctx->cur_field = buf[5] & 1;
196+ ctx->cur_field = first_field ? buf[5] & 1 : !ctx->cur_field;
197197 frame->interlaced_frame = 1;
198198 frame->top_field_first = first_field ^ ctx->cur_field;
199199 av_log(ctx->avctx, AV_LOG_DEBUG,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t