vlc/vlc-3.0 | branch: master | Marc Haisenko <[email protected]> | 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 <[email protected]>

> 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;
 }
 

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to