gl: Fix leak of the whole CGL context

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>
This commit is contained in:
Andoni Morales Alastruey 2022-07-08 20:38:51 +02:00 committed by GStreamer Marge Bot
parent 8e2bbfed13
commit 7db2a3cf11

View file

@ -352,7 +352,12 @@ gst_gl_context_cocoa_swap_buffers (GstGLContext * context)
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