]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dxva2_internal.h
qsvdec: only access hwaccel_context is the pixel format is QSV
[ffmpeg] / libavcodec / dxva2_internal.h
index 3b651a42bc1dc021abcef539c5e526d9315beb24..30aec8b93c7a6c30e0cca7928dcef1cf14fcf444 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
 #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
 
 #include "avcodec.h"
-#include "mpegvideo.h"
 
 typedef void DECODER_BUFFER_DESC;