aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-06-24 11:17:13 +0100
committerReinhard Tartler <siretart@tauware.de>2013-03-19 08:41:24 +0100
commitcd534fdf86e12ccd9a702ce0aee093b95150df8e (patch)
tree5838ea62e5d3836988c2cbbf4999ed7d39a835bc
parent36aad4f1cc707feb15f071260a99f239b6623a59 (diff)
downloadffmpeg-cd534fdf86e12ccd9a702ce0aee093b95150df8e.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) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rwxr-xr-xconfigure2
-rw-r--r--libavcodec/dxva2_internal.h7
2 files changed, 9 insertions, 0 deletions
diff --git a/configure b/configure
index 081854feb9..844069bcc9 100755
--- a/configure
+++ b/configure
@@ -1073,6 +1073,7 @@ HAVE_LIST="
dlfcn_h
dlopen
dos_paths
+ dxva_h
ebp_available
ebx_available
exp2
@@ -2866,6 +2867,7 @@ check_func_headers windows.h MapViewOfFile
check_func_headers windows.h VirtualAlloc
check_header dlfcn.h
+check_header dxva.h
check_header dxva2api.h
check_header malloc.h
check_header poll.h
diff --git a/libavcodec/dxva2_internal.h b/libavcodec/dxva2_internal.h
index 57fc7bd6f9..e2305b1a24 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"