[vlc-commits] dxva: fix Close call when the va_pool was not created yet
Steve Lhomme
git at videolan.org
Wed Oct 9 10:15:45 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Oct 9 09:48:36 2019 +0200| [bccf352a6ff0601a3e08ae726d5cbf8799b05ceb] | committer: Steve Lhomme
dxva: fix Close call when the va_pool was not created yet
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bccf352a6ff0601a3e08ae726d5cbf8799b05ceb
---
modules/codec/avcodec/d3d11va.c | 3 ++-
modules/codec/avcodec/dxva2.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index bc28c12e08..e41a61e544 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -306,7 +306,8 @@ static void Close(vlc_va_t *va)
{
vlc_va_sys_t *sys = va->sys;
- va_pool_Close(va, sys->va_pool);
+ if (sys->va_pool)
+ va_pool_Close(va, sys->va_pool);
D3D11_Destroy( &sys->hd3d );
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 2c176b971c..aa05d6095a 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -243,7 +243,8 @@ static void Close(vlc_va_t *va)
{
vlc_va_sys_t *sys = va->sys;
- va_pool_Close(va, sys->va_pool);
+ if (sys->va_pool)
+ va_pool_Close(va, sys->va_pool);
if (sys->dxva2_dll)
FreeLibrary(sys->dxva2_dll);
More information about the vlc-commits
mailing list