X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fnvdec_mpeg12.c;h=9a9030d8d35824a1f1c501fff6f2d77dfbcf498f;hb=0a071f7124beaf0929f772a8618ac1b6c17b0222;hp=7293d5055548055f8ca00e72d80660f28f913a6b;hpb=a12063b118ad05409ff775ba30fab00265ad3031;p=ffmpeg diff --git a/libavcodec/nvdec_mpeg12.c b/libavcodec/nvdec_mpeg12.c index 7293d505554..9a9030d8d35 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, @@ -87,7 +91,7 @@ static int nvdec_mpeg12_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx) { // Each frame can at most have one P and one B reference - return ff_nvdec_frame_params(avctx, hw_frames_ctx, 2); + return ff_nvdec_frame_params(avctx, hw_frames_ctx, 2, 0); } #if CONFIG_MPEG2_NVDEC_HWACCEL