diff options
author | James Almer <jamrial@gmail.com> | 2023-04-11 15:02:14 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2023-05-04 18:14:02 -0300 |
commit | 2f561ba953e23887ddb25ab1b6739aab04ff9115 (patch) | |
tree | dff824910ba954804d593dbf1aee0978dd5b612e /libavcodec/ffv1dec.c | |
parent | 2df4e054d4b8f69ce3c2c06aace9df9ba6d2ac2e (diff) | |
download | ffmpeg-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/ffv1dec.c')
-rw-r--r-- | libavcodec/ffv1dec.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index a3f9302233..c49db83b5c 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -217,13 +217,13 @@ static int decode_slice_header(const FFV1Context *f, FFV1Context *fs) ps = get_symbol(c, state, 0); if (ps == 1) { - f->cur->interlaced_frame = 1; - f->cur->top_field_first = 1; + f->cur->flags |= AV_FRAME_FLAG_INTERLACED; + f->cur->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } else if (ps == 2) { - f->cur->interlaced_frame = 1; - f->cur->top_field_first = 0; + f->cur->flags |= AV_FRAME_FLAG_INTERLACED; + f->cur->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST; } else if (ps == 3) { - f->cur->interlaced_frame = 0; + f->cur->flags &= ~AV_FRAME_FLAG_INTERLACED; } f->cur->sample_aspect_ratio.num = get_symbol(c, state, 0); f->cur->sample_aspect_ratio.den = get_symbol(c, state, 0); @@ -881,9 +881,9 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, if (f->version < 3 && avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in container */ - p->interlaced_frame = 1; + p->flags |= AV_FRAME_FLAG_INTERLACED; if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB) - p->top_field_first = 1; + p->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; } f->avctx = avctx; |