Commit 7f21b02a authored by Adrien Maglo's avatar Adrien Maglo

EGL: destroy the created EGLSurface on Close()

parent cafdd029
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment