mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 15:56:42 +00:00
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.
This commit is contained in:
parent
5c41d67b3c
commit
fca23cea51
2 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-01-05 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* 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 <tim at centricular dot net>
|
||||
|
||||
* tests/examples/seek/scrubby.c: (main):
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue