qsvenc: Value '0' is not a valid value for parameter GopOptFlag

The accepted values for GopOptFlag are MFX_GOP_CLOSED (1) and
MFX_GOP_STRICT (2).

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Signed-off-by: Zhong Li <zhongli_dev@126.com>
pull/360/head
Haihao Xiang 4 years ago committed by Zhong Li
parent 487dfa9f04
commit f2feb31b78
  1. 2
      libavcodec/qsvenc.c

@ -531,7 +531,7 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
q->param.mfx.GopPicSize = FFMAX(0, avctx->gop_size);
q->param.mfx.GopRefDist = FFMAX(-1, avctx->max_b_frames) + 1;
q->param.mfx.GopOptFlag = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ?
MFX_GOP_CLOSED : 0;
MFX_GOP_CLOSED : MFX_GOP_STRICT;
q->param.mfx.IdrInterval = q->idr_interval;
q->param.mfx.NumSlice = avctx->slices;
q->param.mfx.NumRefFrame = FFMAX(0, avctx->refs);

Loading…
Cancel
Save