[vlc-commits] EGL: destroy the created EGLSurface on Close()

Adrien Maglo git at videolan.org
Tue Nov 5 09:37:39 CET 2013


vlc | branch: master | Adrien Maglo <magsoft at videolan.org> | Tue Nov  5 09:37:26 2013 +0100| [7f21b02aecc0175a270744efee774b4a3482389a] | committer: Adrien Maglo

EGL: destroy the created EGLSurface on Close()

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

 modules/video_output/egl.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/video_output/egl.c b/modules/video_output/egl.c
index be4a17e..58cbece 100644
--- a/modules/video_output/egl.c
+++ b/modules/video_output/egl.c
@@ -152,6 +152,7 @@ static int Open (vlc_object_t *obj, const struct gl_api *api)
 
     gl->sys = sys;
     sys->display = EGL_NO_DISPLAY;
+    sys->surface = EGL_NO_SURFACE;
 
 #ifdef USE_PLATFORM_X11
     sys->x11 = NULL;
@@ -327,7 +328,11 @@ static void Close (vlc_object_t *obj)
     vlc_gl_sys_t *sys = gl->sys;
 
     if (sys->display != EGL_NO_DISPLAY)
+    {
+        if (sys->surface != EGL_NO_SURFACE)
+            eglDestroySurface(sys->display, sys->surface);
         eglTerminate(sys->display);
+    }
 #ifdef USE_PLATFORM_X11
     if (sys->x11 != NULL)
         XCloseDisplay(sys->x11);



More information about the vlc-commits mailing list