avcodec/nvenc: add option to disable all extra SEI data
With these triggering a lot of crashes recently, an option to globally
disable all of them is added as a tool to work around those crashes in
case the SEI data is not needed by the user.
Also re-enables s12m for hevc_nvenc, since the issue is not specifically
with that, but it affects all SEI data.
Signed-off-by: Timo Rothenpieler <[email protected]>
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index a2513c8..ee046b9 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -2325,10 +2325,12 @@
pic_params.inputTimeStamp = frame->pts;
- res = prepare_sei_data_array(avctx, frame);
- if (res < 0)
- return res;
- sei_count = res;
+ if (ctx->extra_sei) {
+ res = prepare_sei_data_array(avctx, frame);
+ if (res < 0)
+ return res;
+ sei_count = res;
+ }
nvenc_codec_specific_pic_params(avctx, &pic_params, ctx->sei_data, sei_count);
} else {