From ad2270036bad07ecf6be3685ef6d95e73afcb8ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C3=ABl=20Carr=C3=A9?= <funman@videolan.org>
Date: Fri, 3 Feb 2012 18:54:38 -0500
Subject: [PATCH] dxva2: workaround broken definition in mingw-w64 header
 (cherry picked from commit 9dc8b9bc27270752415d1fbc9629d9d35a6d8251)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Rafaël Carré <funman@videolan.org>
---
 modules/codec/avcodec/dxva2.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index eb07c46816..09fc7715f1 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)
-- 
2.25.4