mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-03 14:32:16 +02:00
avcodec/dnxhddec: ignore second flag for encoded field
And instead use previous field flag. Fixes decoding files produced by non-compliant encoders.
This commit is contained in:
parent
2589060b92
commit
507fdcd1b0
@ -193,7 +193,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
|
|||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
if (buf[5] & 2) { /* interlaced */
|
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->interlaced_frame = 1;
|
||||||
frame->top_field_first = first_field ^ ctx->cur_field;
|
frame->top_field_first = first_field ^ ctx->cur_field;
|
||||||
av_log(ctx->avctx, AV_LOG_DEBUG,
|
av_log(ctx->avctx, AV_LOG_DEBUG,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user