[FFmpeg-cvslog] dxva: Include last the internal header

Luca Barbato git at videolan.org
Wed Oct 14 23:02:08 CEST 2015


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Tue Oct 13 23:20:33 2015 +0200| [08377f9c3bf6dbe216512a2e05c9fac837b13fc0] | committer: Luca Barbato

dxva: Include last the internal header

It redefines _WIN32_WINNT, possibly causing problems with the
w32pthreads.h header.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=08377f9c3bf6dbe216512a2e05c9fac837b13fc0
---

 libavcodec/dxva2_h264.c  |    6 +++++-
 libavcodec/dxva2_hevc.c  |    6 +++++-
 libavcodec/dxva2_mpeg2.c |    6 +++++-
 libavcodec/dxva2_vc1.c   |    6 +++++-
 4 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index a4a88ce..8f7c4a7 100644
--- a/libavcodec/dxva2_h264.c
+++ b/libavcodec/dxva2_h264.c
@@ -20,11 +20,15 @@
  * 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;
diff --git a/libavcodec/dxva2_hevc.c b/libavcodec/dxva2_hevc.c
index 88d4782..aa684bb 100644
--- a/libavcodec/dxva2_hevc.c
+++ b/libavcodec/dxva2_hevc.c
@@ -22,9 +22,13 @@
 
 #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 {
diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c
index 62308b4..2d88f9b 100644
--- a/libavcodec/dxva2_mpeg2.c
+++ b/libavcodec/dxva2_mpeg2.c
@@ -21,10 +21,14 @@
  */
 
 #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;
diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
index 73f9fb4..d170e18 100644
--- a/libavcodec/dxva2_vc1.c
+++ b/libavcodec/dxva2_vc1.c
@@ -20,11 +20,15 @@
  * 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;



More information about the ffmpeg-cvslog mailing list