From: Wim Taymans Date: Sun, 14 Apr 2002 11:35:03 +0000 (+0000) Subject: Added more funky cases X-Git-Tag: BRANCH-RELEASE-0_4_0-ROOT~272 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73f7bf6677a204861abf6d6cbb2b968d097067fd;p=platform%2Fupstream%2Fgstreamer.git Added more funky cases Original commit message from CVS: Added more funky cases --- diff --git a/gst/gstparse.c b/gst/gstparse.c index aea23dc..6b8c789 100644 --- a/gst/gstparse.c +++ b/gst/gstparse.c @@ -66,13 +66,18 @@ dynamic_connect (GstElement * element, GstPad * newpad, gpointer data) return; } } + /* try to find a target pad if we don't know it yet */ if (!dc->target_pad) { - dc->target_pad = gst_element_get_compatible_pad (dc->target_element, newpad); - warn = FALSE; + if (!GST_PAD_IS_CONNECTED (newpad)) { + dc->target_pad = gst_element_get_compatible_pad (dc->target_element, newpad); + warn = FALSE; + } + else { + return; + } } - - if (!GST_PAD_IS_CONNECTED (newpad)) { + if (!GST_PAD_IS_CONNECTED (dc->target_pad)) { gst_element_set_state (dc->pipeline, GST_STATE_PAUSED); if (!gst_pad_connect (newpad, dc->target_pad) && warn) { g_warning ("could not connect %s:%s to %s:%s", GST_DEBUG_PAD_NAME (newpad),