summaryrefslogtreecommitdiffstats
path: root/video/out/gl_rpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/gl_rpi.c')
-rw-r--r--video/out/gl_rpi.c3
1 files changed, 1 insertions, 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;