ffmpeg | branch: master | Timo Rothenpieler <t...@rothenpieler.org> | Fri Nov  
1 17:38:52 2024 +0100| [d724584d68e10cba01c7d6dd412104ac8317ef28] | committer: 
Timo Rothenpieler

avcodec/nvenc: set bitstreamRestrictionFlag when neccesary

This mimics the behaviour of libx264 for setting this flag.

Fixes #11131

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

 libavcodec/nvenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 2cce478be0..06e3fb81a4 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -1310,6 +1310,8 @@ static av_cold int nvenc_setup_h264_config(AVCodecContext 
*avctx)
         avctx->profile = AV_PROFILE_H264_HIGH_444_PREDICTIVE;
     }
 
+    vui->bitstreamRestrictionFlag = cc->gopLength != 1 || avctx->profile < 
AV_PROFILE_H264_HIGH;
+
     h264->chromaFormatIDC = avctx->profile == 
AV_PROFILE_H264_HIGH_444_PREDICTIVE ? 3 : 1;
 
     h264->level = ctx->level;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to