This was leaking the CGL context and several resources
allocated in the context, around 70MB for a 1080p clip
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2736>
static void
gst_gl_context_cocoa_destroy_context (GstGLContext *context)
{
- /* FIXME: Need to release context and other things? */
+ GstGLContextCocoa *context_cocoa = GST_GL_CONTEXT_COCOA (context);
+
+ if (context_cocoa->priv->gl_context != NULL) {
+ CGLDestroyContext(context_cocoa->priv->gl_context);
+ context_cocoa->priv->gl_context = NULL;
+ }
}
static guintptr