From c31f7249925dbebe3492c12350bb7a1be42824c0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 31 Aug 2024 03:21:09 +0200 Subject: m --- src/encoder/video/cuda.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/encoder/video/cuda.c b/src/encoder/video/cuda.c index 69e570f..5c2cd08 100644 --- a/src/encoder/video/cuda.c +++ b/src/encoder/video/cuda.c @@ -299,8 +299,8 @@ static gsr_supported_video_codecs gsr_video_encoder_cuda_get_supported_codecs(gs goto done; typedef NVENCSTATUS NVENCAPI (*FUNC_NvEncodeAPICreateInstance)(NV_ENCODE_API_FUNCTION_LIST *functionList); - FUNC_NvEncodeAPICreateInstance NvEncodeAPICreateInstance = (FUNC_NvEncodeAPICreateInstance)dlsym(nvenc_lib, "NvEncodeAPICreateInstance"); - if(!NvEncodeAPICreateInstance) { + FUNC_NvEncodeAPICreateInstance nvEncodeAPICreateInstance = (FUNC_NvEncodeAPICreateInstance)dlsym(nvenc_lib, "NvEncodeAPICreateInstance"); + if(!nvEncodeAPICreateInstance) { fprintf(stderr, "gsr error: gsr_video_encoder_cuda_get_supported_codecs: failed to find NvEncodeAPICreateInstance in libnvidia-encode.so\n"); goto done; } @@ -308,8 +308,8 @@ static gsr_supported_video_codecs gsr_video_encoder_cuda_get_supported_codecs(gs NV_ENCODE_API_FUNCTION_LIST function_list; memset(&function_list, 0, sizeof(function_list)); function_list.version = NV_ENCODE_API_FUNCTION_LIST_VER; - if(NvEncodeAPICreateInstance(&function_list) != NV_ENC_SUCCESS) { - fprintf(stderr, "gsr error: gsr_video_encoder_cuda_get_supported_codecs: NvEncodeAPICreateInstance failed\n"); + if(nvEncodeAPICreateInstance(&function_list) != NV_ENC_SUCCESS) { + fprintf(stderr, "gsr error: gsr_video_encoder_cuda_get_supported_codecs: nvEncodeAPICreateInstance failed\n"); goto done; } @@ -326,7 +326,7 @@ static gsr_supported_video_codecs gsr_video_encoder_cuda_get_supported_codecs(gs // In such cases fallback to old api version if possible and try again. params.apiVersion = NVENCAPI_VERSION_470; if(function_list.nvEncOpenEncodeSessionEx(¶ms, &nvenc_encoder) != NV_ENC_SUCCESS) { - fprintf(stderr, "gsr error: gsr_video_encoder_cuda_get_supported_codecs: NvEncOpenEncodeSessionEx failed\n"); + fprintf(stderr, "gsr error: gsr_video_encoder_cuda_get_supported_codecs: nvEncOpenEncodeSessionEx failed\n"); goto done; } } -- cgit v1.2.3