aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/rawdec.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-04-11 15:02:14 -0300
committerJames Almer <jamrial@gmail.com>2023-05-04 18:14:02 -0300
commit2f561ba953e23887ddb25ab1b6739aab04ff9115 (patch)
treedff824910ba954804d593dbf1aee0978dd5b612e /libavcodec/rawdec.c
parent2df4e054d4b8f69ce3c2c06aace9df9ba6d2ac2e (diff)
downloadffmpeg-2f561ba953e23887ddb25ab1b6739aab04ff9115.tar.gz
avcodec: use the new AVFrame interlace flags in all decoders and encoders
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/rawdec.c')
-rw-r--r--libavcodec/rawdec.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index c20c317fed..72920d86f0 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -234,8 +234,9 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame,
return res;
if (context->tff >= 0) {
- frame->interlaced_frame = 1;
- frame->top_field_first = context->tff;
+ frame->flags |= AV_FRAME_FLAG_INTERLACED;
+ if (context->tff == 1)
+ frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
}
if ((res = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0)
@@ -459,9 +460,9 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame,
}
if (avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in container */
- frame->interlaced_frame = 1;
+ frame->flags |= AV_FRAME_FLAG_INTERLACED;
if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB)
- frame->top_field_first = 1;
+ frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
}
*got_frame = 1;