It seems EAGL expects the application to simply ignore unused
EAGL contexts as the resources for it would be released when a new
context is set as the current one. Also move the egl extensions
querying to after a context is set to prevent crashes.
This makes the EAGL version of eglglessink reusable.
gst_egl_adaptation_destroy_context (GstEglAdaptationContext * ctx)
{
if (ctx->eaglctx->eagl_context) {
- [ctx->eaglctx->eagl_context dealloc];
+ /* 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 = NULL;
}
}