[vlc-commits] nvdec: fix release of pictures in the pool

Steve Lhomme git at videolan.org
Fri Sep 4 13:49:10 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Sep  4 12:42:52 2020 +0200| [3a51a7aa0371998cafbf84b5e4fc997f6f3a54f1] | committer: Steve Lhomme

nvdec: fix release of pictures in the pool

Since we set the picture p_sys it will try to deallocate the value when the
picture is destroyed.

Regression from 855dbc02b1826e0cf67faeda462aba74f6824139.

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

 modules/hw/nvdec/nvdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/hw/nvdec/nvdec.c b/modules/hw/nvdec/nvdec.c
index a7c8c70b9c..94b3558435 100644
--- a/modules/hw/nvdec/nvdec.c
+++ b/modules/hw/nvdec/nvdec.c
@@ -178,7 +178,7 @@ static nvdec_pool_t* nvdec_pool_Create(vlc_video_context *vctx,
         if (ret != CUDA_SUCCESS || pool->outputDevicePtr[i] == 0)
             goto free_pool;
 
-        pics[i] = picture_NewFromFormat(fmt);
+        pics[i] = picture_NewFromResource(fmt, &(picture_resource_t) { 0 });
         if (!pics[i])
             goto free_pool;
         pics[i]->p_sys = (void*)(uintptr_t)pool->outputDevicePtr[i];



More information about the vlc-commits mailing list