vlc/vlc-3.0 | branch: master | Thomas Guillem <[email protected]> | Fri Jul 20 
10:29:26 2018 +0200| [c014f068244ca12a33ecd0f59665d842e26218c4] | 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.

(cherry picked from commit f5a766e3699f19f3a37f6331e62bdc5de0e7fd04)
Signed-off-by: Thomas Guillem <[email protected]>

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

 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 9162675447..10277c5045 100644
--- a/modules/video_output/opengl/egl.c
+++ b/modules/video_output/opengl/egl.c
@@ -204,6 +204,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