From: Tim-Philipp Müller Date: Wed, 11 Oct 2006 13:24:42 +0000 (+0000) Subject: gst/: Activate pad before adding it to the already-running element. X-Git-Tag: RELEASE-0_10_5~114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a91177414c6c798ee921faf575ee15a509e77488;p=platform%2Fupstream%2Fgst-plugins-good.git gst/: Activate pad before adding it to the already-running element. Original commit message from CVS: * gst/apetag/gsttagdemux.c: (gst_tag_demux_add_srcpad): * gst/icydemux/gsticydemux.c: (gst_icydemux_add_srcpad): * gst/id3demux/gstid3demux.c: (gst_id3demux_add_srcpad): Activate pad before adding it to the already-running element. * tests/check/elements/icydemux.c: (icydemux_found_pad): Activate newly-created pad too. --- diff --git a/ChangeLog b/ChangeLog index 60bd7cd..1c6902c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-10-11 Tim-Philipp Müller + + * gst/apetag/gsttagdemux.c: (gst_tag_demux_add_srcpad): + * gst/icydemux/gsticydemux.c: (gst_icydemux_add_srcpad): + * gst/id3demux/gstid3demux.c: (gst_id3demux_add_srcpad): + Activate pad before adding it to the already-running element. + + * tests/check/elements/icydemux.c: (icydemux_found_pad): + Activate newly-created pad too. + 2006-10-11 Wim Taymans Patch by: Sebastien Cote diff --git a/gst/apetag/gsttagdemux.c b/gst/apetag/gsttagdemux.c index 2dd189a..1e52ee2 100644 --- a/gst/apetag/gsttagdemux.c +++ b/gst/apetag/gsttagdemux.c @@ -329,6 +329,7 @@ gst_tag_demux_add_srcpad (GstTagDemux * tagdemux, GstCaps * new_caps) tagdemux->priv->src_caps); gst_object_ref (tagdemux->priv->srcpad); + gst_pad_set_active (tagdemux->priv->srcpad, TRUE); if (!(gst_element_add_pad (GST_ELEMENT (tagdemux), tagdemux->priv->srcpad))) return FALSE; gst_element_no_more_pads (GST_ELEMENT (tagdemux)); diff --git a/gst/icydemux/gsticydemux.c b/gst/icydemux/gsticydemux.c index f2ba6e3..dd77566 100644 --- a/gst/icydemux/gsticydemux.c +++ b/gst/icydemux/gsticydemux.c @@ -262,6 +262,7 @@ gst_icydemux_add_srcpad (GstICYDemux * icydemux, GstCaps * new_caps) GST_DEBUG_OBJECT (icydemux, "Adding src pad with caps %" GST_PTR_FORMAT, icydemux->src_caps); + gst_pad_set_active (icydemux->srcpad, TRUE); if (!(gst_element_add_pad (GST_ELEMENT (icydemux), icydemux->srcpad))) return FALSE; gst_element_no_more_pads (GST_ELEMENT (icydemux)); diff --git a/gst/id3demux/gstid3demux.c b/gst/id3demux/gstid3demux.c index 511ef63..9844319 100644 --- a/gst/id3demux/gstid3demux.c +++ b/gst/id3demux/gstid3demux.c @@ -281,6 +281,7 @@ gst_id3demux_add_srcpad (GstID3Demux * id3demux, GstCaps * new_caps) id3demux->src_caps); gst_object_ref (id3demux->srcpad); + gst_pad_set_active (id3demux->srcpad, TRUE); if (!(gst_element_add_pad (GST_ELEMENT (id3demux), id3demux->srcpad))) return FALSE; gst_element_no_more_pads (GST_ELEMENT (id3demux)); diff --git a/tests/check/elements/icydemux.c b/tests/check/elements/icydemux.c index 10504e4..8a6e910 100644 --- a/tests/check/elements/icydemux.c +++ b/tests/check/elements/icydemux.c @@ -101,8 +101,8 @@ icydemux_found_pad (GstElement * src, GstPad * pad, gpointer data) fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK, "Failed to link pads"); gst_object_unref (srcpad); - ASSERT_OBJECT_REFCOUNT (srcpad, "srcpad", 2); + gst_pad_set_active (sinkpad, TRUE); } static GstElement *