OSDN Git Service

dxva2: Clean up definition of _WIN32_WINNT
authorDiego Biurrun <diego@biurrun.de>
Fri, 15 Aug 2014 19:01:15 +0000 (21:01 +0200)
committerDiego Biurrun <diego@biurrun.de>
Mon, 1 Sep 2014 10:23:59 +0000 (12:23 +0200)
Only set a value if _WIN32_WINNT is undefined or smaller than 0x0600. This is
cleaner than unconditional definition and avoids a number of redefinition
warnings. Also only define a value in one of the two dxva2 headers.

libavcodec/dxva2.h
libavcodec/dxva2_internal.h

index 78939be..d9017c6 100644 (file)
  * Public libavcodec DXVA2 header.
  */
 
+#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600
+#undef _WIN32_WINNT
 #define _WIN32_WINNT 0x0600
+#endif
+
 #include <stdint.h>
 #include <d3d9.h>
 #include <dxva2api.h>
index f35a076..b775e6c 100644 (file)
@@ -23,7 +23,6 @@
 #ifndef AVCODEC_DXVA_INTERNAL_H
 #define AVCODEC_DXVA_INTERNAL_H
 
-#define _WIN32_WINNT 0x0600
 #define COBJMACROS
 
 #include "config.h"