[vlc-commits] vout/opengl: fix picture leak in case of error

Thomas Guillem git at videolan.org
Thu Dec 29 14:54:45 CET 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Dec 29 14:54:08 2016 +0100| [9841b74fc4348012a9124b89f787333ebced34ab] | committer: Thomas Guillem

vout/opengl: fix picture leak in case of error

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

 modules/video_output/opengl/converter_android.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/video_output/opengl/converter_android.c b/modules/video_output/opengl/converter_android.c
index bfb27e1..9298a1a 100644
--- a/modules/video_output/opengl/converter_android.c
+++ b/modules/video_output/opengl/converter_android.c
@@ -136,7 +136,11 @@ tc_anop_get_pool(const opengl_tex_converter_t *tc, const video_format_t *fmt,
     };
     picture_pool_t *pool = picture_pool_NewExtended(&pool_cfg);
     if (!pool)
+    {
+        for (unsigned i = 0; i < count; i++)
+            picture_Release(picture[i]);
         goto error;
+    }
 
     return pool;
 error:



More information about the vlc-commits mailing list