[FFmpeg-devel] [PATCH 3/3] nvenc: check sdk 10.0 ptrs at runtime
wangbin
wbsecg1 at gmail.com
Wed Jul 15 17:34:02 EEST 2020
From: wang-bin <wbsecg1 at gmail.com>
---
libavcodec/nvenc.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index cec59f02f3..c421c292c8 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -1248,11 +1248,12 @@ static av_cold int nvenc_setup_encoder(AVCodecContext *avctx)
#ifdef NVENC_HAVE_NEW_PRESETS
ctx->init_encode_params.tuningInfo = ctx->tuning_info;
- nv_status = p_nvenc->nvEncGetEncodePresetConfigEx(ctx->nvencoder,
- ctx->init_encode_params.encodeGUID,
- ctx->init_encode_params.presetGUID,
- ctx->init_encode_params.tuningInfo,
- &preset_config);
+ if (p_nvenc->nvEncGetEncodePresetConfigEx)
+ nv_status = p_nvenc->nvEncGetEncodePresetConfigEx(ctx->nvencoder,
+ ctx->init_encode_params.encodeGUID,
+ ctx->init_encode_params.presetGUID,
+ ctx->init_encode_params.tuningInfo,
+ &preset_config);
#endif
} else {
#ifdef NVENC_HAVE_NEW_PRESETS
--
2.24.1 (Apple Git-126)
More information about the ffmpeg-devel
mailing list