Skip to content

Commit d724584

Browse files
committed
avcodec/nvenc: set bitstreamRestrictionFlag when neccesary
This mimics the behaviour of libx264 for setting this flag. Fixes #11131
1 parent 0cdcbab commit d724584

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libavcodec/nvenc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,8 @@ static av_cold int nvenc_setup_h264_config(AVCodecContext *avctx)
13101310
avctx->profile = AV_PROFILE_H264_HIGH_444_PREDICTIVE;
13111311
}
13121312

1313+
vui->bitstreamRestrictionFlag = cc->gopLength != 1 || avctx->profile < AV_PROFILE_H264_HIGH;
1314+
13131315
h264->chromaFormatIDC = avctx->profile == AV_PROFILE_H264_HIGH_444_PREDICTIVE ? 3 : 1;
13141316

13151317
h264->level = ctx->level;

0 commit comments

Comments
 (0)