[vlc-commits] d3d11va: fix mismatching ID3D11DeviceContext referencing

Steve Lhomme git at videolan.org
Wed Nov 20 15:19:09 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Nov 20 15:15:06 2019 +0100| [b4afb67f2096deebe9247454f1d816d723df902d] | committer: Steve Lhomme

d3d11va: fix mismatching ID3D11DeviceContext referencing

A reference is added in the private data of the video context. This reference
is released in the video context destructor.

This is done correctly in DXVA2.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b4afb67f2096deebe9247454f1d816d723df902d
---

 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 a15830c7f2..d4319df743 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -360,7 +360,7 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, const AVPixFmtDescriptor *des
     d3d11_video_context_t *priv = GetD3D11ContextPrivate(sys->vctx);
     priv->format = sys->render;
     priv->device = sys->d3d_dev.d3dcontext;
-    ID3D11DeviceContext_Release(priv->device);
+    ID3D11DeviceContext_AddRef(priv->device);
 
     va->ops = &ops;
     *fmt_out = final_fmt;



More information about the vlc-commits mailing list