[vlc-commits] ci_filters: use autoreleasepool

Thomas Guillem git at videolan.org
Tue Sep 12 16:48:55 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Sep 12 16:11:48 2017 +0200| [dbb2e083b452de67eb73e87309bde434153c0b82] | committer: Thomas Guillem

ci_filters: use autoreleasepool

This reduces heavily the memory footprint.

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

 modules/video_filter/ci_filters.m | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/video_filter/ci_filters.m b/modules/video_filter/ci_filters.m
index 16a6f8d219..cd9c49b4da 100644
--- a/modules/video_filter/ci_filters.m
+++ b/modules/video_filter/ci_filters.m
@@ -313,6 +313,7 @@ Filter(filter_t *filter, picture_t *src)
     }
     CFRelease(cvpx);
 
+    @autoreleasepool {
     CIImage *ci_img = [CIImage imageWithCVImageBuffer: cvpxpic_get_ref(src)];
     if (!ci_img)
         goto error;
@@ -341,6 +342,7 @@ Filter(filter_t *filter, picture_t *src)
             toIOSurface: CVPixelBufferGetIOSurface(cvpx)
                  bounds: [ci_img extent]
              colorSpace: ctx->color_space];
+    }
 
     CopyInfoAndRelease(dst, src);
 



More information about the vlc-commits mailing list