[vlc-commits] cvpx: fix leaking CVPixelBuffer

Marc Haisenko git at videolan.org
Wed Jun 3 17:46:30 CEST 2020


vlc/vlc-3.0 | branch: master | Marc Haisenko <marc at darkdust.net> | Tue Jun  2 12:54:20 2020 +0200| [53a07ea4860b9373a8d1266d7ffb447be7af3992] | committer: Alexandre Janniaux

cvpx: fix leaking CVPixelBuffer

CVPixelBuffer references are retained and release by cvpxpic_attach so
releasing after attaching tie the buffer lifetime to the one of the
picture, but failing to release afterwards meant that it wouldn't be
released at all.

(cherry picked from commit c010c528aa191d5936aa72db8874349c8320dae6)
Signed-off-by: Alexandre Janniaux <ajanni at videolabs.io>

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

 modules/video_chroma/cvpx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/video_chroma/cvpx.c b/modules/video_chroma/cvpx.c
index fe4aee62d0..50e903ce0d 100644
--- a/modules/video_chroma/cvpx.c
+++ b/modules/video_chroma/cvpx.c
@@ -363,6 +363,7 @@ Filter(filter_t *filter, picture_t *src)
     {
         picture_Release(dst);
         picture_Release(src);
+        CVPixelBufferRelease(dst_cvpx);
         return NULL;
     }
 
@@ -370,6 +371,7 @@ Filter(filter_t *filter, picture_t *src)
 
     picture_CopyProperties(dst, src);
     picture_Release(src);
+    CVPixelBufferRelease(dst_cvpx);
     return dst;
 }
 



More information about the vlc-commits mailing list