@@ -145,9 +145,9 @@ static void dump_video_param(AVCodecContext *avctx, QSVEncContext *q,
av_log(avctx, AV_LOG_VERBOSE, "GopPicSize: %"PRIu16"; GopRefDist: %"PRIu16"; GopOptFlag: ",
info->GopPicSize, info->GopRefDist);
- if (info->GopOptFlag & MFX_GOP_CLOSED)
+ if (info->GopOptFlag == MFX_GOP_CLOSED)
av_log(avctx, AV_LOG_VERBOSE, "closed ");
- if (info->GopOptFlag & MFX_GOP_STRICT)
+ if (info->GopOptFlag == MFX_GOP_STRICT)
av_log(avctx, AV_LOG_VERBOSE, "strict ");
av_log(avctx, AV_LOG_VERBOSE, "; IdrInterval: %"PRIu16"\n", info->IdrInterval);
@@ -510,7 +510,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);