mirror of https://github.com/mpv-player/mpv
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:
parent
fb94744595
commit
e6fd6d6e49
|
@ -140,8 +140,7 @@ void mp_egl_rpi_destroy(struct mp_egl_rpi *p)
|
||||||
if (p->egl_context)
|
if (p->egl_context)
|
||||||
eglDestroyContext(p->egl_display, p->egl_context);
|
eglDestroyContext(p->egl_display, p->egl_context);
|
||||||
p->egl_context = EGL_NO_CONTEXT;
|
p->egl_context = EGL_NO_CONTEXT;
|
||||||
if (p->egl_display)
|
eglReleaseThread();
|
||||||
eglTerminate(p->egl_display);
|
|
||||||
p->egl_display = EGL_NO_DISPLAY;
|
p->egl_display = EGL_NO_DISPLAY;
|
||||||
talloc_free(p->gl);
|
talloc_free(p->gl);
|
||||||
p->gl = NULL;
|
p->gl = NULL;
|
||||||
|
|
Loading…
Reference in New Issue