[vlc-devel] [PATCH] nvdec: add missing video context release

Alexandre Janniaux ajanni at videolabs.io
Thu Sep 10 13:09:29 CEST 2020


The video context is hold when allocating the picture context and when
cloning it, so it must be released when destroying the picture context.
---
 modules/hw/nvdec/nvdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/hw/nvdec/nvdec.c b/modules/hw/nvdec/nvdec.c
index b3e96dc6ab..49d375efdc 100644
--- a/modules/hw/nvdec/nvdec.c
+++ b/modules/hw/nvdec/nvdec.c
@@ -131,6 +131,7 @@ static void PoolRelease(nvdec_pool_owner_t *owner, void *buffers[], size_t pics_
 static void nvdec_picture_CtxDestroy(struct picture_context_t *picctx)
 {
     pic_pool_context_nvdec_t *srcpic = NVDEC_PICPOOLCTX_FROM_PICCTX(picctx);
+    vlc_video_context_Release(picctx->vctx);
     nvdec_pool_Release(srcpic->pool);
     free(srcpic);
 }
-- 
2.28.0



More information about the vlc-devel mailing list