mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-12 19:14:16 +00:00
gl/cocoa: Return a strong ref to the parent GstGLContext
If the GstGLCAOpenGLLayer was initialized via a parent context, make sure to ref the context before returning it from getGLContext as all callers will unref it. Follow up to !3729 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3885>
This commit is contained in:
parent
1e34b35044
commit
f7fc9fd76e
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ _init_debug (void)
|
|||
GstGLWindow *gst_gl_window;
|
||||
GstGLContext *gst_gl_context = NULL;
|
||||
if (gst_gl_context_ref)
|
||||
return gst_gl_context_ref;
|
||||
return gst_object_ref(gst_gl_context_ref);
|
||||
gst_gl_window = g_weak_ref_get (&self->gst_gl_window_ref);
|
||||
if (gst_gl_window) {
|
||||
gst_gl_context = gst_gl_window_get_context (gst_gl_window);
|
||||
|
|
Loading…
Reference in a new issue