mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-12 01:05:47 +00:00
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:
parent
57ed87f51b
commit
b40c9ff39a
1 changed files with 2 additions and 1 deletions
|
@ -306,7 +306,8 @@ void
|
||||||
gst_egl_adaptation_destroy_context (GstEglAdaptationContext * ctx)
|
gst_egl_adaptation_destroy_context (GstEglAdaptationContext * ctx)
|
||||||
{
|
{
|
||||||
if (ctx->eaglctx->eagl_context) {
|
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;
|
ctx->eaglctx->eagl_context = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue