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

Rafaël Carré git at videolan.org
Sat Feb 4 01:04:44 CET 2012


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

dxva2: workaround broken definition in mingw-w64 header

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

 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 dcb2208..e1c5337 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