[vlc-commits] Fixed a memory leak in opengl.

Laurent Aimar git at videolan.org
Wed Jun 1 21:19:22 CEST 2011


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Jun  1 21:13:14 2011 +0200| [b114b7e697476a05ebba30a789a16054ba530b72] | committer: Laurent Aimar

Fixed a memory leak in opengl.

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

 modules/video_output/opengl.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index 81b48d1..1295bf6 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -386,6 +386,11 @@ void vout_display_opengl_Delete(vout_display_opengl_t *vgl)
         glFlush();
         for (int i = 0; i < VLCGL_TEXTURE_COUNT; i++)
             glDeleteTextures(vgl->chroma->plane_count, vgl->texture[i]);
+        for (int i = 0; i < vgl->region_count; i++) {
+            if (vgl->region[i].texture)
+                glDeleteTextures(1, &vgl->region[i].texture);
+        }
+        free(vgl->region);
 
         if (vgl->program)
             vgl->DeleteProgramsARB(1, &vgl->program);



More information about the vlc-commits mailing list