do connect elements directly, if they can be connected already and don't try to find an element that fits in between

Original commit message from CVS:
do connect elements directly, if they can be connected already and don't try to find an element that fits in between
This commit is contained in:
Benjamin Otte 2003-12-09 16:28:34 +00:00
parent 44fe9524c3
commit e8dbaf28bc

View file

@ -591,6 +591,15 @@ gst_spider_plug_from_srcpad (GstSpiderConnection *conn, GstPad *srcpad)
GST_DEBUG ("trying to plug from %s:%s to %s",
GST_DEBUG_PAD_NAME (srcpad), GST_ELEMENT_NAME (conn->src));
/* see if they match already */
if (gst_pad_link (srcpad, conn->src->sink)) {
GST_DEBUG ("%s:%s and %s:%s can link directly",
GST_DEBUG_PAD_NAME (srcpad), GST_DEBUG_PAD_NAME (conn->src->sink));
gst_pad_unlink (srcpad, conn->src->sink);
gst_spider_create_and_plug (conn, NULL);
return GST_PAD_LINK_OK;
}
/* find a path from src to sink */
plugpath = gst_autoplug_sp (gst_pad_get_caps (srcpad), gst_pad_get_caps (conn->src->sink), spider->factories);