[vlc-devel] [PATCH] dxva2: include d3d9.h before dxva2api.h

Steve Lhomme robux4 at videolabs.io
Fri Feb 26 09:29:27 CET 2016


this is also done in ffmpeg/libav
---
 configure.ac                       | 4 ++--
 modules/codec/avcodec/directx_va.c | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0624952..3b27129 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2425,7 +2425,7 @@ AS_IF([test "${enable_dxva2}" != "no"], [
     AS_IF([test "${enable_dxva2}" = "yes"],
               [AC_MSG_ERROR([Could not find required dxva2api.h])],
               [AC_MSG_WARN([dxva2api.h not found])])
-      ])
+      ],[#include <d3d9.h>])
   ],[
     AS_IF([test "x${enable_dxva2}" != "x"], [
       AC_MSG_ERROR([--enable-dxva2 and --disable-avcodec options are mutually exclusive.])
@@ -2464,7 +2464,7 @@ AS_IF([test "${enable_d3d11va}" != "no"], [
                     AS_IF([test "${enable_d3d11va}" = "yes"],
                           [AC_MSG_ERROR([Could not find required dxva2api.h])],
                           [AC_MSG_WARN([dxva2api.h not found])])
-                  ])
+                  ],[#include <d3d9.h>])
           ],[
             AS_IF([test "${enable_d3d11va}" = "yes"],
                   [AC_MSG_ERROR([Could not find required ID3D11VideoDecoder in d3d11.h])],
diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c
index b8f2325..538b45e 100644
--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -51,6 +51,7 @@ static const int PROF_HEVC_MAIN[]    = { FF_PROFILE_HEVC_MAIN, 0 };
 static const int PROF_HEVC_MAIN10[]  = { FF_PROFILE_HEVC_MAIN,
                                          FF_PROFILE_HEVC_MAIN_10, 0 };
 
+#include <d3d9.h>
 #include <dxva2api.h>
 
 #include <initguid.h> /* must be last included to not redefine existing GUIDs */
-- 
2.6.1.windows.1



More information about the vlc-devel mailing list