dxva2: include dxva.h if found
authorRonald S. Bultje <rsbultje@gmail.com>
Sun, 24 Jun 2012 10:17:13 +0000 (11:17 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 13 Sep 2012 02:45:36 +0000 (04:45 +0200)
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>
configure
libavcodec/dxva2_internal.h

index 07d473e..e307fd3 100755 (executable)
--- a/configure
+++ b/configure
@@ -1168,6 +1168,7 @@ HAVE_LIST="
     dlfcn_h
     dlopen
     dos_paths
+    dxva_h
     ebp_available
     ebx_available
     exp2
@@ -3047,6 +3048,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 -D_WIN32_WINNT=0x0600
 check_header libcrystalhd/libcrystalhd_if.h
 check_header malloc.h
index 23d4d87..fcf45bc 100644 (file)
 
 #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"