[vlc-commits] cvpx: fix leaking CVPixelBuffer

Marc Haisenko git at videolan.org
Wed Jun 3 17:27:07 CEST 2020


vlc | branch: master | Marc Haisenko <marc at darkdust.net> | Tue Jun  2 12:54:20 2020 +0200| [c010c528aa191d5936aa72db8874349c8320dae6] | 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.

Signed-off-by: Alexandre Janniaux <ajanni at videolabs.io>

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

 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 0bb16f5db4..ea275e744f 100644
--- a/modules/video_chroma/cvpx.c
+++ b/modules/video_chroma/cvpx.c
@@ -390,6 +390,7 @@ Filter(filter_t *filter, picture_t *src)
     {
         picture_Release(dst);
         picture_Release(src);
+        CVPixelBufferRelease(dst_cvpx);
         return NULL;
     }
 
@@ -397,6 +398,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