gl: fix application context querying between elements
authorMatthew Waters <matthew@centricular.com>
Fri, 24 Apr 2020 12:38:32 +0000 (22:38 +1000)
committerMatthew Waters <matthew@centricular.com>
Mon, 27 Apr 2020 01:36:02 +0000 (11:36 +1000)
Fixes error introduced by:
a4e49ba8c9657e2230aad32b6988bbda7a755440
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/642

Using the application GL context as the local GL context is not going to
work very well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/643>

ext/gl/gstglbasemixer.c
ext/gl/gstglstereosplit.c
gst-libs/gst/gl/gstglbasefilter.c

index 7459572..719b25f 100644 (file)
@@ -295,7 +295,7 @@ gst_gl_base_mixer_sink_query (GstAggregator * agg, GstAggregatorPad * bpad,
       if (mix->context)
         local = gst_object_ref (mix->context);
       if (mix->priv->other_context)
-        local = gst_object_ref (mix->priv->other_context);
+        other = gst_object_ref (mix->priv->other_context);
       g_rec_mutex_unlock (&mix->priv->context_lock);
 
       ret = gst_gl_handle_context_query ((GstElement *) mix, query,
@@ -545,7 +545,7 @@ gst_gl_base_mixer_src_query (GstAggregator * agg, GstQuery * query)
       if (mix->context)
         local = gst_object_ref (mix->context);
       if (mix->priv->other_context)
-        local = gst_object_ref (mix->priv->other_context);
+        other = gst_object_ref (mix->priv->other_context);
       g_rec_mutex_unlock (&mix->priv->context_lock);
 
       ret = gst_gl_handle_context_query ((GstElement *) mix, query,
index e990ce0..d7d0ef9 100644 (file)
@@ -721,7 +721,7 @@ stereosplit_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
       if (split->context)
         local = gst_object_ref (split->context);
       if (split->other_context)
-        local = gst_object_ref (split->other_context);
+        other = gst_object_ref (split->other_context);
       g_rec_mutex_unlock (&split->context_lock);
 
       ret = gst_gl_handle_context_query ((GstElement *) split, query,
@@ -768,7 +768,7 @@ stereosplit_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
       if (split->context)
         local = gst_object_ref (split->context);
       if (split->other_context)
-        local = gst_object_ref (split->other_context);
+        other = gst_object_ref (split->other_context);
       g_rec_mutex_unlock (&split->context_lock);
 
       ret = gst_gl_handle_context_query ((GstElement *) split, query,
index 0524503..ac092f9 100644 (file)
@@ -288,7 +288,7 @@ gst_gl_base_filter_query (GstBaseTransform * trans, GstPadDirection direction,
       if (filter->context)
         local = gst_object_ref (filter->context);
       if (filter->priv->other_context)
-        local = gst_object_ref (filter->priv->other_context);
+        other = gst_object_ref (filter->priv->other_context);
       g_rec_mutex_unlock (&filter->priv->context_lock);
 
       ret = gst_gl_handle_context_query ((GstElement *) filter, query,