[FFmpeg-cvslog] avcodec/nvenc: fix library names on cygwin

Timo Rothenpieler git at videolan.org
Sun Aug 28 19:58:21 EEST 2016


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Sun Aug 28 17:54:29 2016 +0200| [19e75fd8838df668fb4b9af95b3a57874b1af32a] | committer: Timo Rothenpieler

avcodec/nvenc: fix library names on cygwin

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=19e75fd8838df668fb4b9af95b3a57874b1af32a
---

 libavcodec/nvenc.c | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index d1c7d93..c92df53 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -21,24 +21,26 @@
 
 #include "config.h"
 
-#if defined(_WIN32)
-#include <windows.h>
-
-#define CUDA_LIBNAME TEXT("nvcuda.dll")
-#if ARCH_X86_64
-#define NVENC_LIBNAME TEXT("nvEncodeAPI64.dll")
+#if defined(_WIN32) || defined(__CYGWIN__)
+# define CUDA_LIBNAME "nvcuda.dll"
+# if ARCH_X86_64
+#  define NVENC_LIBNAME "nvEncodeAPI64.dll"
+# else
+#  define NVENC_LIBNAME "nvEncodeAPI.dll"
+# endif
 #else
-#define NVENC_LIBNAME TEXT("nvEncodeAPI.dll")
+# define CUDA_LIBNAME "libcuda.so"
+# define NVENC_LIBNAME "libnvidia-encode.so"
 #endif
 
-#define dlopen(filename, flags) LoadLibrary((filename))
+#if defined(_WIN32)
+#include <windows.h>
+
+#define dlopen(filename, flags) LoadLibrary(TEXT(filename))
 #define dlsym(handle, symbol)   GetProcAddress(handle, symbol)
 #define dlclose(handle)         FreeLibrary(handle)
 #else
 #include <dlfcn.h>
-
-#define CUDA_LIBNAME "libcuda.so"
-#define NVENC_LIBNAME "libnvidia-encode.so"
 #endif
 
 #include "libavutil/hwcontext.h"



More information about the ffmpeg-cvslog mailing list