mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
harness: also forward context queries between harnesses
Fixes multiple OpenGL contexts being created with a setup like: h = gst_harness_new ("glcolorconvert"); gst_harness_add_src (h, "gltestsrc", FALSE); Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/448>
This commit is contained in:
parent
8ecf0956d7
commit
9c45afc87c
1 changed files with 13 additions and 0 deletions
|
@ -435,6 +435,19 @@ gst_harness_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
HARNESS_UNLOCK (h);
|
||||
break;
|
||||
}
|
||||
case GST_QUERY_CONTEXT:
|
||||
HARNESS_LOCK (h);
|
||||
if (priv->forwarding && priv->sink_forward_pad != NULL) {
|
||||
GstPad *peer = gst_pad_get_peer (priv->sink_forward_pad);
|
||||
g_assert (peer != NULL);
|
||||
HARNESS_UNLOCK (h);
|
||||
res = gst_pad_query (peer, query);
|
||||
gst_object_unref (peer);
|
||||
} else {
|
||||
HARNESS_UNLOCK (h);
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
res = gst_pad_query_default (pad, parent, query);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue