diff options
author | Thiago Santos <thiago.sousa.santos@collabora.com> | 2013-04-18 20:26:15 +0000 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-04-19 08:45:02 +0200 |
commit | b40c9ff39a3f186b36aee2db3cd69ab593503834 (patch) | |
tree | c000da5e47591f722f611149f93e9b213da10739 | |
parent | 57ed87f51ba0a90a435d30e4deb8bb342d5c85e3 (diff) | |
download | gstreamer-plugins-bad-b40c9ff39a3f186b36aee2db3cd69ab593503834.tar.gz |
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.
-rw-r--r-- | ext/eglgles/gstegladaptation_eagl.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/eglgles/gstegladaptation_eagl.m b/ext/eglgles/gstegladaptation_eagl.m index 68541f4cb..aae27215d 100644 --- a/ext/eglgles/gstegladaptation_eagl.m +++ b/ext/eglgles/gstegladaptation_eagl.m @@ -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; } } |