[vlc-devel] [PATCH 15/23] d3d11va: it's safe to load/unload d3d11.dll even in direct rendering

Steve Lhomme robux4 at videolabs.io
Wed Jun 21 14:15:00 CEST 2017


LoadLibrary/FreeLibrary keeps track of how many times it's opened.
It's also safer in case the vout dies before the decoder.
---
 modules/codec/avcodec/d3d11va.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 923266c741..38bfb9bb86 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -416,7 +416,7 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
 #if VLC_WINSTORE_APP
     err = directx_va_Open(va, &sys->dx_sys, false);
 #else
-    err = directx_va_Open(va, &sys->dx_sys, dx_sys->d3ddev == NULL || va->sys->d3dctx == NULL);
+    err = directx_va_Open(va, &sys->dx_sys, true);
 #endif
     if (err!=VLC_SUCCESS)
         goto error;
-- 
2.12.1



More information about the vlc-devel mailing list