[vlc-commits] egl: explicitly destroy the context
Thomas Guillem
git at videolan.org
Fri Jul 20 10:33:57 CEST 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jul 20 10:29:26 2018 +0200| [f5a766e3699f19f3a37f6331e62bdc5de0e7fd04] | committer: Thomas Guillem
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f5a766e3699f19f3a37f6331e62bdc5de0e7fd04
---
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);
More information about the vlc-commits
mailing list