summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_dec.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/mpegvideo_dec.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/mpegvideo_dec.c')
-rw-r--r--libavcodec/mpegvideo_dec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c
index 522a0aada5..482f388b99 100644
--- a/libavcodec/mpegvideo_dec.c
+++ b/libavcodec/mpegvideo_dec.c
@@ -331,15 +331,15 @@ FF_ENABLE_DEPRECATION_WARNINGS
s->current_picture_ptr = pic;
// FIXME use only the vars from current_pic
- s->current_picture_ptr->f->top_field_first = s->top_field_first;
+ s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST * !!s->top_field_first;
if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO ||
s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
if (s->picture_structure != PICT_FRAME)
- s->current_picture_ptr->f->top_field_first =
- (s->picture_structure == PICT_TOP_FIELD) == s->first_field;
+ s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST *
+ ((s->picture_structure == PICT_TOP_FIELD) == s->first_field);
}
- s->current_picture_ptr->f->interlaced_frame = !s->progressive_frame &&
- !s->progressive_sequence;
+ s->current_picture_ptr->f->flags |= AV_FRAME_FLAG_INTERLACED * (!s->progressive_frame &&
+ !s->progressive_sequence);
s->current_picture_ptr->field_picture = s->picture_structure != PICT_FRAME;
s->current_picture_ptr->f->pict_type = s->pict_type;