]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dxva2_internal.h
Merge commit '80ea66112817c719b476de8f7d8d3b325f4c7dd1'
[ffmpeg] / libavcodec / dxva2_internal.h
index 426de9dc16326d78a9a4be71a078d64b1137521b..6c9d0bb03f635228c1fdc01717582c81134a640d 100644 (file)
@@ -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
 #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