diff options
author | Philip Langdale <philipl@overt.org> | 2016-11-24 11:07:21 -0800 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-11-24 20:15:57 +0100 |
commit | 48a7c4be3a8ea97ddc2150c20b5cf4db4f1b8e85 (patch) | |
tree | 545e00761ca03dd325cc944420e3bfb6d4a9172f /video/out/opengl/cuda_dynamic.c | |
parent | 5aab17f833c9b6bb24bd6d5369fbca5c1efab1c7 (diff) | |
download | mpv-48a7c4be3a8ea97ddc2150c20b5cf4db4f1b8e85.tar.bz2 mpv-48a7c4be3a8ea97ddc2150c20b5cf4db4f1b8e85.tar.xz |
vo_opengl: hwdec_cuda: Prefix cuda symbols to avoid collisions
We want to avoid causing problems if libmpv is used in an application
that links cuda, or if the libav* libraries are linked with cuda,
as might happen if the scale_npp filter is used.
Diffstat (limited to 'video/out/opengl/cuda_dynamic.c')
-rw-r--r-- | video/out/opengl/cuda_dynamic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/video/out/opengl/cuda_dynamic.c b/video/out/opengl/cuda_dynamic.c index f37baca6d0..1135a1f077 100644 --- a/video/out/opengl/cuda_dynamic.c +++ b/video/out/opengl/cuda_dynamic.c @@ -22,7 +22,7 @@ #if defined(_WIN32) # include <windows.h> # define dlopen(filename, flags) LoadLibrary(TEXT(filename)) -# define dlsym(handle, symbol) GetProcAddress(handle, symbol) +# define dlsym(handle, symbol) (void *)GetProcAddress(handle, symbol) # define dlclose(handle) FreeLibrary(handle) #else # include <dlfcn.h> @@ -35,7 +35,7 @@ #endif #define CUDA_DECL(NAME, TYPE) \ - TYPE *NAME; + TYPE *mpv_ ## NAME; CUDA_FNS(CUDA_DECL) static bool cuda_loaded = false; @@ -49,7 +49,7 @@ static void cuda_do_load(void) } #define CUDA_LOAD_SYMBOL(NAME, TYPE) \ - NAME = (TYPE *)dlsym(lib, #NAME); if (!NAME) return; + mpv_ ## NAME = dlsym(lib, #NAME); if (!mpv_ ## NAME) return; CUDA_FNS(CUDA_LOAD_SYMBOL) |