[vlc-commits] dxva2: fix DXVA2.DLL reference not increased when copying the picture context

Steve Lhomme git at videolan.org
Thu Mar 12 08:23:15 CET 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Mar 11 13:24:26 2020 +0100| [39f58efa915668fbc4b42c9f28d57cdee5e5abed] | committer: Steve Lhomme

dxva2: fix DXVA2.DLL reference not increased when copying the picture context

The DLL is referenced in another picture so also needs to be kept alive while
that picture is around.

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

 modules/codec/avcodec/dxva2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 75fb22be70..3dda2c6c03 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -178,6 +178,7 @@ static picture_context_t *dxva2_pic_context_copy(picture_context_t *ctx)
     if (unlikely(pic_ctx==NULL))
         return NULL;
     *pic_ctx = *src_ctx;
+    pic_ctx->dxva2_dll = LoadLibrary(TEXT("DXVA2.DLL"));
     vlc_video_context_Hold(pic_ctx->ctx.s.vctx);
     va_surface_AddRef(pic_ctx->va_surface);
     AcquireD3D9PictureSys(&pic_ctx->ctx.picsys);



More information about the vlc-commits mailing list