summaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2017-07-04 20:03:00 +0300
committerMartin Storsjö <martin@martin.st>2017-07-05 13:55:11 +0300
commit1912973a2d0a4d7f8e323eb23ee4e0e29d5852ca (patch)
treec928ebee149be0dc658cfc0553cb8be63414993d /libavutil
parent61f589e31e84ae02d7ac6837f30f19c437b1fc2e (diff)
downloadffmpeg-streaming-1912973a2d0a4d7f8e323eb23ee4e0e29d5852ca.zip
ffmpeg-streaming-1912973a2d0a4d7f8e323eb23ee4e0e29d5852ca.tar.gz
d3d11va: Check WINAPI_FAMILY instead of HAVE_LOADLIBRARY
If using the winstore compat library, a fallback LoadLibrary function does exist, that only calls LoadPackagedLibrary though (which doesn't work for dynamically loading d3d11 DLLs). Therefore explicitly check the targeted API family instead. Make this check a reusable HAVE_* component which other parts of the libraries can check when necessary as well. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/hwcontext_d3d11va.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c
index 75f78d8..0a8cc5b 100644
--- a/libavutil/hwcontext_d3d11va.c
+++ b/libavutil/hwcontext_d3d11va.c
@@ -56,7 +56,7 @@ static PFN_D3D11_CREATE_DEVICE mD3D11CreateDevice;
static av_cold void load_functions(void)
{
-#if HAVE_LOADLIBRARY
+#if !HAVE_UWP
// We let these "leak" - this is fine, as unloading has no great benefit, and
// Windows will mark a DLL as loaded forever if its internal refcount overflows
// from too many LoadLibrary calls.
@@ -486,7 +486,7 @@ static int d3d11va_device_create(AVHWDeviceContext *ctx, const char *device,
int ret;
// (On UWP we can't check this.)
-#if HAVE_LOADLIBRARY
+#if !HAVE_UWP
if (!LoadLibrary("d3d11_1sdklayers.dll"))
is_debug = 0;
#endif
@@ -527,7 +527,7 @@ static int d3d11va_device_create(AVHWDeviceContext *ctx, const char *device,
ID3D10Multithread_Release(pMultithread);
}
-#if HAVE_LOADLIBRARY && HAVE_DXGIDEBUG_H
+#if !HAVE_UWP && HAVE_DXGIDEBUG_H
if (is_debug) {
HANDLE dxgidebug_dll = LoadLibrary("dxgidebug.dll");
if (dxgidebug_dll) {
OpenPOWER on IntegriCloud