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.
This commit is contained in:
Tim-Philipp Müller 2006-10-11 13:24:42 +00:00
parent 734243efa2
commit a91177414c
5 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,13 @@
2006-10-11 Tim-Philipp Müller <tim at centricular dot net>
* 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 <wim@fluendo.com>
Patch by: Sebastien Cote <sebas642 at yahoo dot ca>

View file

@ -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));

View file

@ -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));

View file

@ -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));

View file

@ -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 *