From 5d47b8e232ef0d21e7d385b83b57e13b5405460d Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Fri, 24 Apr 2020 22:38:32 +1000 Subject: [PATCH] gl: fix application context querying between elements 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: --- ext/gl/gstglbasemixer.c | 4 ++-- ext/gl/gstglstereosplit.c | 4 ++-- gst-libs/gst/gl/gstglbasefilter.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/gl/gstglbasemixer.c b/ext/gl/gstglbasemixer.c index 7459572..719b25f 100644 --- a/ext/gl/gstglbasemixer.c +++ b/ext/gl/gstglbasemixer.c @@ -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, diff --git a/ext/gl/gstglstereosplit.c b/ext/gl/gstglstereosplit.c index e990ce0..d7d0ef9 100644 --- a/ext/gl/gstglstereosplit.c +++ b/ext/gl/gstglstereosplit.c @@ -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, diff --git a/gst-libs/gst/gl/gstglbasefilter.c b/gst-libs/gst/gl/gstglbasefilter.c index 0524503..ac092f9 100644 --- a/gst-libs/gst/gl/gstglbasefilter.c +++ b/gst-libs/gst/gl/gstglbasefilter.c @@ -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, -- 2.7.4