aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-06-24 11:17:13 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-09-13 04:46:50 +0200
commitb45a8f6d249d20572cb4f37c86eb4432a0cff16f (patch)
tree0bd27246282a699a401883f74a4e6107207f84e8
parentae8491ce33cfe5a9e33764579c9e55e785107e98 (diff)
downloadffmpeg-b45a8f6d249d20572cb4f37c86eb4432a0cff16f.tar.gz
dxva2: include dxva.h if found
Apparently, some build environments require dxva.h even for dxva2, while others lack this header entirely. Including it conditionally allows building in both cases. Signed-off-by: Martin Storsjö <martin@martin.st> (cherry picked from commit fa84506177f0246b30d4ea6a99ee5d419f3e4550) Conflicts: configure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-xconfigure2
-rw-r--r--libavcodec/dxva2_internal.h7
2 files changed, 9 insertions, 0 deletions
diff --git a/configure b/configure
index 0b6e0ac022..bbdc6001da 100755
--- a/configure
+++ b/configure
@@ -1173,6 +1173,7 @@ HAVE_LIST="
dlfcn_h
dlopen
dos_paths
+ dxva_h
ebp_available
ebx_available
exp2
@@ -3125,6 +3126,7 @@ check_func_headers windows.h VirtualAlloc
check_func_headers glob.h glob
check_header dlfcn.h
+check_header dxva.h
check_header dxva2api.h -D_WIN32_WINNT=0x0600
check_header libcrystalhd/libcrystalhd_if.h
check_header malloc.h
diff --git a/libavcodec/dxva2_internal.h b/libavcodec/dxva2_internal.h
index 23d4d87522..fcf45bc664 100644
--- a/libavcodec/dxva2_internal.h
+++ b/libavcodec/dxva2_internal.h
@@ -25,7 +25,14 @@
#define _WIN32_WINNT 0x0600
#define COBJMACROS
+
+#include "config.h"
+
#include "dxva2.h"
+#if HAVE_DXVA_H
+#include <dxva.h>
+#endif
+
#include "avcodec.h"
#include "mpegvideo.h"