[vlc-commits] dxva2: workaround broken definition in mingw-w64 header

Rafaël Carré git at videolan.org
Mon Feb 27 19:20:47 CET 2012


vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Fri Feb  3 18:54:38 2012 -0500| [ad2270036bad07ecf6be3685ef6d95e73afcb8ee] | committer: Rafaël Carré

dxva2: workaround broken definition in mingw-w64 header
(cherry picked from commit 9dc8b9bc27270752415d1fbc9629d9d35a6d8251)

Signed-off-by: Rafaël Carré <funman at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=ad2270036bad07ecf6be3685ef6d95e73afcb8ee
---

 modules/codec/avcodec/dxva2.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index eb07c46..09fc771 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -66,6 +66,14 @@
 #include <shlwapi.h>
 #include <d3d9.h>
 
+#ifdef __MINGW32__
+# include <_mingw.h>
+# if defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 3
+#  undef  IDirect3DDeviceManager9_Release
+#  define IDirect3DDeviceManager9_Release(This) (This)->lpVtbl->Release(This)
+# endif
+#endif
+
 /* */
 #define DXVA2_E_NOT_INITIALIZED     MAKE_HRESULT(1, 4, 4096)
 #define DXVA2_E_NEW_VIDEO_DEVICE    MAKE_HRESULT(1, 4, 4097)



More information about the vlc-commits mailing list