From 9d3683f11fb56f622979bcd3ca283b19369223f6 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 17 Nov 2003 01:08:00 +0000 Subject: [PATCH] query sink pads before querying peers of source pads in default handler Original commit message from CVS: query sink pads before querying peers of source pads in default handler --- gst/gstelement.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/gstelement.c b/gst/gstelement.c index aba9010a97..d0758bb3cd 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -2069,7 +2069,10 @@ gst_element_query (GstElement *element, GstQueryType type, if (oclass->query) return oclass->query (element, type, format, value); else { - GstPad *pad = gst_element_get_random_pad (element, GST_PAD_SINK); + GstPad *pad = gst_element_get_random_pad (element, GST_PAD_SRC); + if (pad) + return gst_pad_query (pad, type, format, value); + pad = gst_element_get_random_pad (element, GST_PAD_SINK); if (pad) return gst_pad_query (GST_PAD_PEER (pad), type, format, value); }