mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +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
e9e84da30a
commit
9dd4f40ad6
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