Commit 119955be authored by Julien Isorce's avatar Julien Isorce

gstglcontext: is_shared should return FALSE if no group

If a sub class of GstGLContext does not create a group
then it currently crashes:

0 g_atomic_int_get (&share->refcount)
1 _context_share_group_is_shared (context->priv->sharegroup)
2 gst_gl_context_is_shared
3 _default_set_sync_gl

https://bugzilla.gnome.org/show_bug.cgi?id=774518
parent c03a4829
...@@ -1670,6 +1670,10 @@ gboolean ...@@ -1670,6 +1670,10 @@ gboolean
gst_gl_context_is_shared (GstGLContext * context) gst_gl_context_is_shared (GstGLContext * context)
{ {
g_return_val_if_fail (GST_IS_GL_CONTEXT (context), FALSE); g_return_val_if_fail (GST_IS_GL_CONTEXT (context), FALSE);
if (!context->priv->sharegroup)
return FALSE;
if (GST_IS_GL_WRAPPED_CONTEXT (context)) if (GST_IS_GL_WRAPPED_CONTEXT (context))
g_return_val_if_fail (context->priv->active_thread, FALSE); g_return_val_if_fail (context->priv->active_thread, FALSE);
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment