summaryrefslogtreecommitdiff
path: root/libavcodec/nvdec_mpeg12.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2020-01-02 13:15:27 +0100
committerTimo Rothenpieler <timo@rothenpieler.org>2020-01-02 13:15:27 +0100
commitd4996a600ca0334235a4b66beae5b5c3474535c4 (patch)
tree3a541ebdbf0a2593f0fef7fc9a401d0a53ad1059 /libavcodec/nvdec_mpeg12.c
parente47a95463116b17a6e96ef87e1341b5544747982 (diff)
avcodec/nvdec_mpeg12: set field flags
Diffstat (limited to 'libavcodec/nvdec_mpeg12.c')
-rw-r--r--libavcodec/nvdec_mpeg12.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/nvdec_mpeg12.c b/libavcodec/nvdec_mpeg12.c
index 300e1d3d88..9a9030d8d3 100644
--- a/libavcodec/nvdec_mpeg12.c
+++ b/libavcodec/nvdec_mpeg12.c
@@ -50,6 +50,10 @@ static int nvdec_mpeg12_start_frame(AVCodecContext *avctx, const uint8_t *buffer
.FrameHeightInMbs = (cur_frame->height + 15) / 16,
.CurrPicIdx = cf->idx,
+ .field_pic_flag = s->picture_structure != PICT_FRAME,
+ .bottom_field_flag = s->picture_structure == PICT_BOTTOM_FIELD,
+ .second_field = s->picture_structure != PICT_FRAME && !s->first_field,
+
.intra_pic_flag = s->pict_type == AV_PICTURE_TYPE_I,
.ref_pic_flag = s->pict_type == AV_PICTURE_TYPE_I ||
s->pict_type == AV_PICTURE_TYPE_P,