From f5a766e3699f19f3a37f6331e62bdc5de0e7fd04 Mon Sep 17 00:00:00 2001 From: Thomas Guillem Date: Fri, 20 Jul 2018 10:29:26 +0200 Subject: [PATCH] egl: explicitly destroy the context The eglTerminate() documentation state that any contexts and surfaces associated with the display are marked for deletion. But this doesn't seem to be the case on Android with a GLES2 context. --- modules/video_output/opengl/egl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/video_output/opengl/egl.c b/modules/video_output/opengl/egl.c index 3cfc3f41c3..dec85f86ac 100644 --- a/modules/video_output/opengl/egl.c +++ b/modules/video_output/opengl/egl.c @@ -182,6 +182,8 @@ static void Close (vlc_object_t *obj) if (sys->display != EGL_NO_DISPLAY) { + if (sys->context != EGL_NO_CONTEXT) + eglDestroyContext(sys->display, sys->context); if (sys->surface != EGL_NO_SURFACE) eglDestroySurface(sys->display, sys->surface); eglTerminate(sys->display); -- 2.11.4.GIT