gl_rpi: destroy the EGLSurface too

Most likely doesn't matter much.
This commit is contained in:
wm4 2015-08-20 15:21:01 +02:00
parent 0d5541af47
commit 895c8801a2
1 changed files with 5 additions and 2 deletions

View File

@ -131,11 +131,14 @@ fail:
void mp_egl_rpi_destroy(struct mp_egl_rpi *p)
{
if (p->egl_context) {
if (p->egl_display) {
eglMakeCurrent(p->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
EGL_NO_CONTEXT);
eglDestroyContext(p->egl_display, p->egl_context);
}
if (p->egl_surface)
eglDestroySurface(p->egl_display, p->egl_surface);
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);