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).
This commit is contained in:
wm4 2015-08-31 19:46:02 +02:00
parent fb94744595
commit e6fd6d6e49
1 changed files with 1 additions and 2 deletions

View File

@ -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;