mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
gl: Let gst_gl_context_get_thread() return a new reference to the GThread
Otherwise it might go away in the meantime and the caller has some random pointer.
This commit is contained in:
parent
d153b01280
commit
8d457a4d18
1 changed files with 3 additions and 1 deletions
|
@ -422,7 +422,7 @@ gst_gl_context_activate (GstGLContext * context, gboolean activate)
|
|||
* gst_gl_context_get_thread:
|
||||
* @context: a #GstGLContext
|
||||
*
|
||||
* Returns: The #GThread, @context is current in or NULL
|
||||
* Returns: (transfer full): The #GThread, @context is current in or NULL
|
||||
*
|
||||
* Since: 1.6
|
||||
*/
|
||||
|
@ -433,6 +433,8 @@ gst_gl_context_get_thread (GstGLContext * context)
|
|||
|
||||
GST_OBJECT_LOCK (context);
|
||||
ret = context->priv->active_thread;
|
||||
if (ret)
|
||||
g_thread_ref (ret);
|
||||
GST_OBJECT_UNLOCK (context);
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue