summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2014-08-14 18:53:40 -0300
committerThiago Santos <thiagoss@osg.samsung.com>2014-08-14 19:16:43 -0300
commit3001f3b4332e2a5173f6cb7d56592747899f461c (patch)
treeed686fdfed4157a7554789b8de9bfb92d7a08d38
parentf88a98199732ec37f0f27bdb8672939c481eb568 (diff)
inputselector: always proxy caps query
Otherwise it would only be proxied for the active pad which can lead upstream to use an incompatible caps for the downstream element. Even if a reconfigure event is sent upstream when the pad is activated, this will save the caps reconfiguration if it is already using an acceptable caps.
-rw-r--r--plugins/elements/gstinputselector.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/elements/gstinputselector.c b/plugins/elements/gstinputselector.c
index 45db79bd8a..fb50802516 100644
--- a/plugins/elements/gstinputselector.c
+++ b/plugins/elements/gstinputselector.c
@@ -588,8 +588,13 @@ static gboolean
gst_selector_pad_query (GstPad * pad, GstObject * parent, GstQuery * query)
{
gboolean res = FALSE;
+ GstInputSelector *self = (GstInputSelector *) parent;
switch (GST_QUERY_TYPE (query)) {
+ case GST_QUERY_CAPS:
+ /* always proxy caps query, regardless of active pad or not */
+ res = gst_pad_peer_query (self->srcpad, query);
+ break;
case GST_QUERY_ALLOCATION:{
GstPad *active_sinkpad;
GstInputSelector *sel = GST_INPUT_SELECTOR (parent);