diff options
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | libavcodec/dxva2_internal.h | 9 |
2 files changed, 10 insertions, 1 deletions
@@ -4270,7 +4270,7 @@ check_lib2 "windows.h psapi.h" GetProcessMemoryInfo -lpsapi check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss -check_type "windows.h dxva.h" "DXVA_PicParams_HEVC" +check_type "windows.h dxva.h" "DXVA_PicParams_HEVC" -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -D_CRT_BUILD_DESKTOP_APP=0 check_type "windows.h d3d11.h" "ID3D11VideoDecoder" check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0600 diff --git a/libavcodec/dxva2_internal.h b/libavcodec/dxva2_internal.h index 3b651a42bc..7155123b5d 100644 --- a/libavcodec/dxva2_internal.h +++ b/libavcodec/dxva2_internal.h @@ -27,6 +27,9 @@ #include "config.h" +/* define the proper COM entries before forcing desktop APIs */ +#include <objbase.h> + #if CONFIG_DXVA2 #include "dxva2.h" #endif @@ -34,6 +37,12 @@ #include "d3d11va.h" #endif #if HAVE_DXVA_H +/* When targeting WINAPI_FAMILY_PHONE_APP or WINAPI_FAMILY_APP, dxva.h + * defines nothing. Force the struct definitions to be visible. */ +#undef WINAPI_FAMILY +#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP +#undef _CRT_BUILD_DESKTOP_APP +#define _CRT_BUILD_DESKTOP_APP 0 #include <dxva.h> #endif |