summaryrefslogtreecommitdiff
path: root/libavcodec/nvenc.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-01-13 14:07:37 +0100
committerAnton Khirnov <anton@khirnov.net>2016-02-14 22:08:13 +0100
commitc51b2c79a7ba084253e892c56dd49ee97115c7de (patch)
tree6c5256804069367e6cedf0e9f390d86b54405fbf /libavcodec/nvenc.h
parentbd49be885e9ad6bae599c54473ba2fa2957eb140 (diff)
Allow linking to CUDA dynamically instead of dlopen()ing it at runtime
Diffstat (limited to 'libavcodec/nvenc.h')
-rw-r--r--libavcodec/nvenc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h
index 6edca75195..a0020377e6 100644
--- a/libavcodec/nvenc.h
+++ b/libavcodec/nvenc.h
@@ -22,6 +22,8 @@
#include <cuda.h>
#include <nvEncodeAPI.h>
+#include "config.h"
+
#include "libavutil/fifo.h"
#include "libavutil/opt.h"
@@ -47,7 +49,9 @@ typedef NVENCSTATUS (NVENCAPI *PNVENCODEAPICREATEINSTANCE)(NV_ENCODE_API_FUNCTIO
typedef struct NVENCLibraryContext
{
+#if !CONFIG_CUDA
void *cuda;
+#endif
void *nvenc;
PCUINIT cu_init;