dxva: Include last the internal header
authorLuca Barbato <lu_zero@gentoo.org>
Tue, 13 Oct 2015 21:20:33 +0000 (23:20 +0200)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 14 Oct 2015 12:35:34 +0000 (14:35 +0200)
It redefines _WIN32_WINNT, possibly causing problems with the
w32pthreads.h header.

libavcodec/dxva2_h264.c
libavcodec/dxva2_hevc.c
libavcodec/dxva2_mpeg2.c
libavcodec/dxva2_vc1.c

index a4a88ce..8f7c4a7 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "dxva2_internal.h"
 #include "h264.h"
 #include "h264data.h"
 #include "mpegutils.h"
 
+// The headers above may include w32threads.h, which uses the original
+// _WIN32_WINNT define, while dxva2_internal.h redefines it to target a
+// potentially newer version.
+#include "dxva2_internal.h"
+
 struct dxva2_picture_context {
     DXVA_PicParams_H264   pp;
     DXVA_Qmatrix_H264     qm;
index 88d4782..aa684bb 100644 (file)
 
 #include "libavutil/avassert.h"
 
-#include "dxva2_internal.h"
 #include "hevc.h"
 
+// The headers above may include w32threads.h, which uses the original
+// _WIN32_WINNT define, while dxva2_internal.h redefines it to target a
+// potentially newer version.
+#include "dxva2_internal.h"
+
 #define MAX_SLICES 256
 
 struct hevc_dxva2_picture_context {
index 62308b4..2d88f9b 100644 (file)
  */
 
 #include "libavutil/log.h"
-#include "dxva2_internal.h"
 #include "mpegutils.h"
 #include "mpegvideo.h"
 
+// The headers above may include w32threads.h, which uses the original
+// _WIN32_WINNT define, while dxva2_internal.h redefines it to target a
+// potentially newer version.
+#include "dxva2_internal.h"
+
 #define MAX_SLICES 1024
 struct dxva2_picture_context {
     DXVA_PictureParameters pp;
index 73f9fb4..d170e18 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include "dxva2_internal.h"
 #include "mpegutils.h"
 #include "vc1.h"
 #include "vc1data.h"
 
+// The headers above may include w32threads.h, which uses the original
+// _WIN32_WINNT define, while dxva2_internal.h redefines it to target a
+// potentially newer version.
+#include "dxva2_internal.h"
+
 struct dxva2_picture_context {
     DXVA_PictureParameters pp;
     DXVA_SliceInfo         si;