From fca23cea51bee2e681cceb253da55bb832399e64 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 5 Jan 2007 18:57:53 +0000 Subject: [PATCH] ext/ogg/gstogmparse.c: Activate pads before adding them to the element. Original commit message from CVS: * ext/ogg/gstogmparse.c: (gst_ogm_parse_stream_header), (gst_ogm_parse_change_state): Activate pads before adding them to the element. --- ChangeLog | 6 ++++++ ext/ogg/gstogmparse.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 17ec4eb..fcb395d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-01-05 Jan Schmidt + + * ext/ogg/gstogmparse.c: (gst_ogm_parse_stream_header), + (gst_ogm_parse_change_state): + Activate pads before adding them to the element. + 2007-01-05 Tim-Philipp Müller * tests/examples/seek/scrubby.c: (main): diff --git a/ext/ogg/gstogmparse.c b/ext/ogg/gstogmparse.c index fa5043c..e4acdcd 100644 --- a/ext/ogg/gstogmparse.c +++ b/ext/ogg/gstogmparse.c @@ -627,6 +627,7 @@ gst_ogm_parse_stream_header (GstOgmParse * ogm, const guint8 * data, guint size) if (current_caps && caps && !gst_caps_is_equal (current_caps, caps)) { GST_WARNING_OBJECT (ogm, "Already an existing pad %s:%s", GST_DEBUG_PAD_NAME (ogm->srcpad)); + gst_pad_set_active (ogm->srcpad, FALSE); gst_element_remove_pad (GST_ELEMENT (ogm), ogm->srcpad); ogm->srcpad = NULL; } else { @@ -640,6 +641,7 @@ gst_ogm_parse_stream_header (GstOgmParse * ogm, const guint8 * data, guint size) ogm->srcpad = gst_pad_new_from_template (ogm->srcpadtempl, "src"); gst_pad_use_fixed_caps (ogm->srcpad); gst_pad_set_caps (ogm->srcpad, caps); + gst_pad_set_active (ogm->srcpad, TRUE); gst_element_add_pad (GST_ELEMENT (ogm), ogm->srcpad); GST_INFO_OBJECT (ogm, "Added pad %s:%s with caps %" GST_PTR_FORMAT, GST_DEBUG_PAD_NAME (ogm->srcpad), caps); @@ -921,6 +923,7 @@ gst_ogm_parse_change_state (GstElement * element, GstStateChange transition) switch (transition) { case GST_STATE_CHANGE_PAUSED_TO_READY: if (ogm->srcpad) { + gst_pad_set_active (ogm->srcpad, FALSE); gst_element_remove_pad (element, ogm->srcpad); ogm->srcpad = NULL; } -- 2.7.4