diff options
author | Philip Langdale <philipl@overt.org> | 2019-02-20 06:12:19 +0300 |
---|---|---|
committer | Philip Langdale <philipl@overt.org> | 2019-02-24 20:13:01 +0300 |
commit | 96d79ff5b5c8b08eaead6fd2c77a265fd2c40b22 (patch) | |
tree | e8489e63dcd198219e93ee94f80b164e7b471615 /libavutil | |
parent | fc32e08941ea2795a3096e7a4013843e9ebf5fe3 (diff) |
avutil/cuda_check: Fix non-dynamic-loader implementation
The function typedefs we were using are only present when using the
dynamic loader, which means compilation breaks for code directly
using the cuda SDK.
To fix this, let's just duplicate the function typedefs locally.
These are not going to change.
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/cuda_check.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavutil/cuda_check.h b/libavutil/cuda_check.h index ec1705b000..d02ea7eec4 100644 --- a/libavutil/cuda_check.h +++ b/libavutil/cuda_check.h @@ -20,6 +20,9 @@ #ifndef AVUTIL_CUDA_CHECK_H #define AVUTIL_CUDA_CHECK_H +typedef CUresult CUDAAPI cuda_check_GetErrorName(CUresult error, const char** pstr); +typedef CUresult CUDAAPI cuda_check_GetErrorString(CUresult error, const char** pstr); + /** * Wrap a CUDA function call and print error information if it fails. */ @@ -35,8 +38,8 @@ static inline int ff_cuda_check(void *avctx, if (err == CUDA_SUCCESS) return 0; - ((tcuGetErrorName *)cuGetErrorName_fn)(err, &err_name); - ((tcuGetErrorString *)cuGetErrorString_fn)(err, &err_string); + ((cuda_check_GetErrorName *)cuGetErrorName_fn)(err, &err_name); + ((cuda_check_GetErrorString *)cuGetErrorString_fn)(err, &err_string); av_log(avctx, AV_LOG_ERROR, "%s failed", func); if (err_name && err_string) |