diff --git a/gst/gstutils.c b/gst/gstutils.c index 57c2a64728..2fc29cbb23 100644 --- a/gst/gstutils.c +++ b/gst/gstutils.c @@ -2799,7 +2799,11 @@ gst_pad_proxy_setcaps (GstPad * pad, GstCaps * caps) if (element == NULL) return FALSE; - iter = gst_element_iterate_pads (element); + /* only iterate the pads in the oposite direction */ + if (GST_PAD_IS_SRC (pad)) + iter = gst_element_iterate_sink_pads (element); + else + iter = gst_element_iterate_src_pads (element); g_value_init (&ret, G_TYPE_BOOLEAN); g_value_set_boolean (&ret, TRUE);