mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 23:33:07 +00:00
lavc/rawdec: set field order on decoded frame.
This commit is contained in:
parent
6184fa2067
commit
9cc02101ff
@ -147,12 +147,6 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
|
|||||||
avctx->codec_tag == MKTAG('W','R','A','W'))
|
avctx->codec_tag == MKTAG('W','R','A','W'))
|
||||||
context->flip = 1;
|
context->flip = 1;
|
||||||
|
|
||||||
if (avctx->field_order > AV_FIELD_PROGRESSIVE) { /*we have interlaced material flagged in container */
|
|
||||||
avctx->coded_frame->interlaced_frame = 1;
|
|
||||||
if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB)
|
|
||||||
avctx->coded_frame->top_field_first = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (avctx->codec_tag == AV_RL32("yuv2") &&
|
if (avctx->codec_tag == AV_RL32("yuv2") &&
|
||||||
avctx->pix_fmt == AV_PIX_FMT_YUYV422)
|
avctx->pix_fmt == AV_PIX_FMT_YUYV422)
|
||||||
context->is_yuv2 = 1;
|
context->is_yuv2 = 1;
|
||||||
@ -325,6 +319,12 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in container */
|
||||||
|
frame->interlaced_frame = 1;
|
||||||
|
if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB)
|
||||||
|
frame->top_field_first = 1;
|
||||||
|
}
|
||||||
|
|
||||||
*got_frame = 1;
|
*got_frame = 1;
|
||||||
return buf_size;
|
return buf_size;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user