vlc | branch: master | Thomas Guillem <[email protected]> | 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);

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to