mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
streamcombiner: fix srcpad query caps
The caps query on the srcpad should return the template caps instead of forwarding the query.
This commit is contained in:
parent
30a66af4e2
commit
e2f91075e4
1 changed files with 18 additions and 11 deletions
|
@ -166,19 +166,26 @@ gst_stream_combiner_src_query (GstPad * pad, GstObject * parent,
|
||||||
{
|
{
|
||||||
GstStreamCombiner *stream_combiner = (GstStreamCombiner *) parent;
|
GstStreamCombiner *stream_combiner = (GstStreamCombiner *) parent;
|
||||||
GstPad *sinkpad = NULL;
|
GstPad *sinkpad = NULL;
|
||||||
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
STREAMS_LOCK (stream_combiner);
|
switch (GST_QUERY_TYPE (query)) {
|
||||||
if (stream_combiner->current)
|
case GST_QUERY_CAPS:
|
||||||
sinkpad = stream_combiner->current;
|
ret = gst_pad_query_default (pad, parent, query);
|
||||||
else if (stream_combiner->sinkpads)
|
break;
|
||||||
sinkpad = (GstPad *) stream_combiner->sinkpads->data;
|
default:
|
||||||
STREAMS_UNLOCK (stream_combiner);
|
STREAMS_LOCK (stream_combiner);
|
||||||
|
if (stream_combiner->current)
|
||||||
|
sinkpad = stream_combiner->current;
|
||||||
|
else if (stream_combiner->sinkpads)
|
||||||
|
sinkpad = (GstPad *) stream_combiner->sinkpads->data;
|
||||||
|
STREAMS_UNLOCK (stream_combiner);
|
||||||
|
|
||||||
if (sinkpad)
|
if (sinkpad)
|
||||||
/* Forward upstream as is */
|
/* Forward upstream as is */
|
||||||
return gst_pad_peer_query (sinkpad, query);
|
ret = gst_pad_peer_query (sinkpad, query);
|
||||||
|
break;
|
||||||
return FALSE;
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue