[vlc-commits] dxva: release the video context early on close
Steve Lhomme
git at videolan.org
Tue Oct 22 10:18:31 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Oct 22 10:14:44 2019 +0200| [c741652c1555de1cb9dc97835f347fda8275f1e6] | committer: Steve Lhomme
dxva: release the video context early on close
Especially since the local sys will be freed after that.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c741652c1555de1cb9dc97835f347fda8275f1e6
---
modules/codec/avcodec/d3d11va.c | 6 +++---
modules/codec/avcodec/dxva2.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 7784bc8cf6..17b20067d2 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -245,11 +245,11 @@ static void Close(vlc_va_t *va)
{
vlc_va_sys_t *sys = va->sys;
- if (sys->va_pool)
- va_pool_Close(sys->va_pool);
-
if (sys->vctx)
vlc_video_context_Release(sys->vctx);
+
+ if (sys->va_pool)
+ va_pool_Close(sys->va_pool);
}
static const struct vlc_va_operations ops = { Get, NULL, Close, };
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index eef1dfba2b..c33b246bd6 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -238,11 +238,11 @@ static void Close(vlc_va_t *va)
{
vlc_va_sys_t *sys = va->sys;
- if (sys->va_pool)
- va_pool_Close(sys->va_pool);
-
if (sys->vctx)
vlc_video_context_Release(sys->vctx);
+
+ if (sys->va_pool)
+ va_pool_Close(sys->va_pool);
}
static const struct vlc_va_operations ops = { Get, NULL, Close, };
More information about the vlc-commits
mailing list