[vlc-commits] codec: vt_utils: Fix memory leak due to excess retain of CVPixelBuffer

Marvin Scholz git at videolan.org
Tue Sep 12 09:33:28 CEST 2017


vlc | branch: master | Marvin Scholz <epirat07 at gmail.com> | Mon Sep 11 23:55:09 2017 +0200| [af4d4a3fb626250de68d99f48868d919b5027897] | committer: Thomas Guillem

codec: vt_utils: Fix memory leak due to excess retain of CVPixelBuffer

cvpxpic_attach already retains the CVPixelBufferRef, so retaining it
before calling this function is not necessary.

Fix #18767

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

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

diff --git a/modules/codec/vt_utils.c b/modules/codec/vt_utils.c
index 3faf8598dd..02290fba51 100644
--- a/modules/codec/vt_utils.c
+++ b/modules/codec/vt_utils.c
@@ -185,7 +185,7 @@ cvpxpic_unmap(picture_t *mapped_pic)
         return NULL;
     }
 
-    cvpxpic_attach(hw_pic, CVPixelBufferRetain((void *)mapped_pic->p_sys));
+    cvpxpic_attach(hw_pic, (void *)mapped_pic->p_sys);
     picture_CopyProperties(hw_pic, mapped_pic);
     picture_Release(mapped_pic);
     return hw_pic;



More information about the vlc-commits mailing list