eglglessink: eagl: fix eagl reuse by not releasing the context

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.
This commit is contained in:
Thiago Santos 2013-04-18 20:26:15 +00:00 committed by Sebastian Dröge
parent 57ed87f51b
commit b40c9ff39a

View file

@ -306,7 +306,8 @@ void
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;
}
}