mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
eglglessink: Properly clean up renderbuffers and EAGL context
This commit is contained in:
parent
2d17cd62ef
commit
7f5422c06d
1 changed files with 7 additions and 2 deletions
|
@ -299,6 +299,12 @@ gst_egl_adaptation_destroy_surface (GstEglAdaptationContext * ctx)
|
|||
if (ctx->eaglctx->framebuffer) {
|
||||
glDeleteFramebuffers (1, &ctx->eaglctx->framebuffer);
|
||||
ctx->eaglctx->framebuffer = 0;
|
||||
|
||||
glDeleteRenderbuffers(1, &ctx->eaglctx->depth_renderbuffer);
|
||||
ctx->eaglctx->depth_renderbuffer = 0;
|
||||
glDeleteRenderbuffers(1, &ctx->eaglctx->color_renderbuffer);
|
||||
ctx->eaglctx->color_renderbuffer = 0;
|
||||
|
||||
ctx->have_surface = FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -324,8 +330,7 @@ void
|
|||
gst_egl_adaptation_destroy_context (GstEglAdaptationContext * ctx)
|
||||
{
|
||||
if (ctx->eaglctx->eagl_context) {
|
||||
/* Do not release/dealloc as it seems that EAGL expects to do all
|
||||
* the cleanup by itself when a new context replaces the old one */
|
||||
[ctx->eaglctx->eagl_context release];
|
||||
ctx->eaglctx->eagl_context = NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue