[FFmpeg-cvslog] avcodec/nvdec_mpeg12: set field flags

Timo Rothenpieler git at videolan.org
Thu Jan 2 14:35:55 EET 2020


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Thu Jan  2 13:15:27 2020 +0100| [d4996a600ca0334235a4b66beae5b5c3474535c4] | committer: Timo Rothenpieler

avcodec/nvdec_mpeg12: set field flags

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d4996a600ca0334235a4b66beae5b5c3474535c4
---

 libavcodec/nvdec_mpeg12.c | 4 ++++
 1 file changed, 4 insertions(+)

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,



More information about the ffmpeg-cvslog mailing list