gst/: Active pads before adding them to the running element. Don't assert on non-BYTE format newsegment events in asf...

Original commit message from CVS:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_sink_event),
(gst_asf_demux_setup_pad), (gst_asf_demux_process_segment):
* gst/mpegstream/gstdvddemux.c: (gst_dvd_demux_get_audio_stream),
(gst_dvd_demux_get_subpicture_stream):
* gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_get_video_stream),
(gst_mpeg_demux_get_audio_stream),
(gst_mpeg_demux_get_private_stream):
Active pads before adding them to the running element. Don't assert
on non-BYTE format newsegment events in asfdemux.
This commit is contained in:
Tim-Philipp Müller 2006-10-09 12:09:14 +00:00
parent 03f40e53fd
commit 3a38311f01
5 changed files with 28 additions and 3 deletions

View file

@ -1,3 +1,15 @@
2006-10-09 Tim-Philipp Müller <tim at centricular dot net>
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_sink_event),
(gst_asf_demux_setup_pad), (gst_asf_demux_process_segment):
* gst/mpegstream/gstdvddemux.c: (gst_dvd_demux_get_audio_stream),
(gst_dvd_demux_get_subpicture_stream):
* gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_get_video_stream),
(gst_mpeg_demux_get_audio_stream),
(gst_mpeg_demux_get_private_stream):
Active pads before adding them to the running element. Don't assert
on non-BYTE format newsegment events in asfdemux.
2006-10-05 Tim-Philipp Müller <tim at centricular dot net>
* ext/dvdread/dvdreadsrc.c: (gst_dvd_read_src_goto_title),

2
common

@ -1 +1 @@
Subproject commit a4af1b8542911352e29d53fba47e2c3d7231ebdb
Subproject commit efcacf2625da231fbee99b68e0f5db6816cf6fad

View file

@ -152,7 +152,12 @@ gst_asf_demux_sink_event (GstPad * pad, GstEvent * event)
gst_event_parse_new_segment (event, NULL, NULL, &newsegment_format,
&newsegment_start, NULL, NULL);
g_assert (newsegment_format == GST_FORMAT_BYTES);
if (newsegment_format != GST_FORMAT_BYTES) {
GST_WARNING_OBJECT (demux, "newsegment format not BYTES, ignoring");
gst_event_unref (event);
break;
}
g_assert (newsegment_start >= 0);
GST_OBJECT_LOCK (demux);
@ -869,6 +874,7 @@ gst_asf_demux_setup_pad (GstASFDemux * demux, GstPad * src_pad,
++demux->num_streams;
gst_pad_set_active (src_pad, TRUE);
gst_element_add_pad (GST_ELEMENT (demux), src_pad);
}
@ -2387,7 +2393,7 @@ gst_asf_demux_process_segment (GstASFDemux * demux,
time_start = segment_info.frag_offset;
segment_info.frag_offset = 0;
segment_info.frag_timestamp = time_start;
segment_info.frag_timestamp = time_start; /* was: demux->timestamp */
}
GST_DEBUG ("multiple = %u, compressed = %u",

View file

@ -654,6 +654,7 @@ gst_dvd_demux_get_audio_stream (GstMPEGDemux * mpeg_demux,
GST_DEBUG_OBJECT (mpeg_demux, "adding pad %s with language = %s",
GST_PAD_NAME (str->pad), (lang_code) ? lang_code : "(unknown)");
gst_pad_set_active (str->pad, TRUE);
gst_element_add_pad (GST_ELEMENT (mpeg_demux), str->pad);
if (codec || lang_code) {
@ -735,6 +736,7 @@ gst_dvd_demux_get_subpicture_stream (GstMPEGDemux * mpeg_demux,
}
if (add_pad) {
gst_pad_set_active (str->pad, TRUE);
gst_element_add_pad (GST_ELEMENT (mpeg_demux), str->pad);
if (dvd_demux->langcodes) {

View file

@ -341,9 +341,11 @@ gst_mpeg_demux_get_video_stream (GstMPEGDemux * mpeg_demux,
CORE, NEGOTIATION, (NULL), ("failed to set caps"));
gst_caps_unref (str->caps);
str->caps = NULL;
gst_pad_set_active (str->pad, TRUE);
gst_element_add_pad (GST_ELEMENT (mpeg_demux), str->pad);
return str;
}
gst_pad_set_active (str->pad, TRUE);
gst_element_add_pad (GST_ELEMENT (mpeg_demux), str->pad);
/* Store the current values. */
@ -409,9 +411,11 @@ gst_mpeg_demux_get_audio_stream (GstMPEGDemux * mpeg_demux,
CORE, NEGOTIATION, (NULL), ("failed to set caps"));
gst_caps_unref (str->caps);
str->caps = NULL;
gst_pad_set_active (str->pad, TRUE);
gst_element_add_pad (GST_ELEMENT (mpeg_demux), str->pad);
return str;
}
gst_pad_set_active (str->pad, TRUE);
gst_element_add_pad (GST_ELEMENT (mpeg_demux), str->pad);
/* stream metadata */
@ -441,6 +445,7 @@ gst_mpeg_demux_get_private_stream (GstMPEGDemux * mpeg_demux,
CLASS (mpeg_demux)->init_stream (mpeg_demux, type, str, stream_nr, name,
CLASS (mpeg_demux)->private_template);
g_free (name);
gst_pad_set_active (str->pad, TRUE);
gst_element_add_pad (GST_ELEMENT (mpeg_demux), str->pad);
mpeg_demux->private_stream[stream_nr] = str;