[FFmpeg-devel] [PATCH] dxva2: Prevent redefinition of _WIN32_WINNT

James Almer jamrial at gmail.com
Fri Feb 8 05:17:06 CET 2013


Don't redefine _WIN32_WINNT when targeting Win7/8

Signed-off-by: James Almer <jamrial at gmail.com>
---
 libavcodec/dxva2_internal.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/dxva2_internal.h b/libavcodec/dxva2_internal.h
index fcf45bc..03f7f5d 100644
--- a/libavcodec/dxva2_internal.h
+++ b/libavcodec/dxva2_internal.h
@@ -23,7 +23,14 @@
 #ifndef AVCODEC_DXVA_INTERNAL_H
 #define AVCODEC_DXVA_INTERNAL_H
 
+#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600
+#undef _WIN32_WINNT
+#endif
+
+#if !defined(_WIN32_WINNT)
 #define _WIN32_WINNT 0x0600
+#endif
+
 #define COBJMACROS
 
 #include "config.h"
-- 
1.7.12.4



More information about the ffmpeg-devel mailing list