diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c index a4278c80b5258cad573cb6eeb82524ef4b51376a..5b23b28f1202b8ad790fdfe1b539738f8d016f5f 100644 --- a/libavcodec/dxva2_h264.c +++ b/libavcodec/dxva2_h264.c @@ -22,16 +22,12 @@ #include "libavutil/avassert.h" +#include "dxva2_internal.h" #include "h264dec.h" #include "h264data.h" #include "h264_ps.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 0ae07d304f1b9aed3595e3f833ecddd5b6e15dcf..dbb701fb1c3fc4bfbb36bdf2e5ce10418bbaf3a8 100644 --- a/libavcodec/dxva2_hevc.c +++ b/libavcodec/dxva2_hevc.c @@ -22,14 +22,10 @@ #include "libavutil/avassert.h" +#include "dxva2_internal.h" #include "hevc_data.h" #include "hevcdec.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 a57778b4271dd0e34f33b8c4ede2e48eda678595..8cc21bf19957d66d543aec9f9f266e9908581c91 100644 --- a/libavcodec/dxva2_mpeg2.c +++ b/libavcodec/dxva2_mpeg2.c @@ -21,13 +21,10 @@ */ #include "libavutil/log.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" +#include "mpegutils.h" +#include "mpegvideo.h" #define MAX_SLICES 1024 struct dxva2_picture_context { diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c index 06f1083b3afd1ff617379e806077074107753d1c..f08ac8b5a0d7c0d91dca252fad0c7a5379e63914 100644 --- a/libavcodec/dxva2_vc1.c +++ b/libavcodec/dxva2_vc1.c @@ -20,16 +20,13 @@ * 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" - #define MAX_SLICES 1024 + struct dxva2_picture_context { DXVA_PictureParameters pp; unsigned slice_count; diff --git a/libavcodec/dxva2_vp9.c b/libavcodec/dxva2_vp9.c index 5a5b226422808470d21fc6d94e5c01bd9f4ac634..eaeab3af7af2389b871ffe8a2adb5badf2a94ef5 100644 --- a/libavcodec/dxva2_vp9.c +++ b/libavcodec/dxva2_vp9.c @@ -23,12 +23,8 @@ #include "libavutil/avassert.h" #include "libavutil/pixdesc.h" -#include "vp9shared.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" +#include "vp9shared.h" struct vp9_dxva2_picture_context { DXVA_PicParams_VP9 pp; diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index d39fdd3fc85a913d9fc4962639588a5681c94da7..b68d26280442cea63bedf324fd55d4052566248a 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -20,14 +20,6 @@ #include -// Include thread.h before redefining _WIN32_WINNT, to get -// the right implementation for AVOnce -#include "thread.h" - -#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600 -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0600 -#endif #define COBJMACROS #include @@ -46,6 +38,7 @@ #include "imgutils.h" #include "pixdesc.h" #include "pixfmt.h" +#include "thread.h" typedef HRESULT(WINAPI *PFN_CREATE_DXGI_FACTORY)(REFIID riid, void **ppFactory); diff --git a/libavutil/hwcontext_dxva2.c b/libavutil/hwcontext_dxva2.c index 665c2d6d746ad7a38dd28560f43b66be5685b102..4585f323bb61d2df27c9030ba56ee9201a44d3ce 100644 --- a/libavutil/hwcontext_dxva2.c +++ b/libavutil/hwcontext_dxva2.c @@ -18,10 +18,6 @@ #include -#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600 -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0600 -#endif #define DXVA2API_USE_BITFIELDS #define COBJMACROS