From e6fd6d6e4914ff27ed6e935315f436ea15cf48ad Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 31 Aug 2015 19:46:02 +0200 Subject: vo_rpi, vo_opengl: do not globally terminate EGL on VO uninit eglTerminate() affects the EGLDisplay in all threads. Since the RPI firmware apparently only ever uses EGL_DEFAULT_DISPLAY, this means it will trash all other contexts on other threads in the same process. Thus we don't call eglTerminate() at all, at least on RPI. Call eglReleaseThread() instead (which may or may not be a NOP). --- video/out/gl_rpi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/video/out/gl_rpi.c b/video/out/gl_rpi.c index 0f308ae291..9109662ef2 100644 --- a/video/out/gl_rpi.c +++ b/video/out/gl_rpi.c @@ -140,8 +140,7 @@ void mp_egl_rpi_destroy(struct mp_egl_rpi *p) if (p->egl_context) eglDestroyContext(p->egl_display, p->egl_context); p->egl_context = EGL_NO_CONTEXT; - if (p->egl_display) - eglTerminate(p->egl_display); + eglReleaseThread(); p->egl_display = EGL_NO_DISPLAY; talloc_free(p->gl); p->gl = NULL; -- cgit v1.2.3