gst-libs/gst/riff/riff-read.c: Don't bail on unknown events.

Original commit message from CVS:
* gst-libs/gst/riff/riff-read.c: (gst_riff_read_use_event):
Don't bail on unknown events.
* gst/audioscale/gstaudioscale.c: (gst_audioscale_chain):
Don't crash on events before negotiation.
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Send tags on pads, too.
* gst/playback/gststreamselector.c:
(gst_stream_selector_request_new_pad):
Forward events on first pad if no input was selected yet.
This commit is contained in:
Ronald S. Bultje 2005-01-10 16:09:25 +00:00
parent 6c73f3f7a7
commit a321095c80
4 changed files with 20 additions and 4 deletions

View file

@ -1,3 +1,15 @@
2005-01-10 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst-libs/gst/riff/riff-read.c: (gst_riff_read_use_event):
Don't bail on unknown events.
* gst/audioscale/gstaudioscale.c: (gst_audioscale_chain):
Don't crash on events before negotiation.
* gst/avi/gstavidemux.c: (gst_avi_demux_add_stream):
Send tags on pads, too.
* gst/playback/gststreamselector.c:
(gst_stream_selector_request_new_pad):
Forward events on first pad if no input was selected yet.
2005-01-10 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/playback/gstplaybasebin.c: (setup_substreams):

View file

@ -190,7 +190,7 @@ gst_riff_read_use_event (GstRiffRead * riff, GstEvent * event)
default:
GST_WARNING ("don't know how to handle event %d", GST_EVENT_TYPE (event));
gst_pad_event_default (riff->sinkpad, event);
return FALSE;
return TRUE;
}
/* happy */

View file

@ -571,9 +571,11 @@ gst_audioscale_chain (GstPad * pad, GstData * _data)
switch (GST_EVENT_TYPE (e)) {
case GST_EVENT_DISCONTINUOUS:{
gint64 new_off;
gint64 new_off = 0;
if (gst_event_discont_get_value (e, GST_FORMAT_TIME, &new_off)) {
if (!audioscale->gst_resample) {
GST_LOG ("Discont before negotiation took place - ignoring");
} else if (gst_event_discont_get_value (e, GST_FORMAT_TIME, &new_off)) {
/* time -> out-sample */
new_off = new_off * audioscale->gst_resample->o_rate / GST_SECOND;
} else if (gst_event_discont_get_value (e,
@ -589,7 +591,7 @@ gst_audioscale_chain (GstPad * pad, GstData * _data)
new_off /= audioscale->gst_resample->i_rate;
} else {
/* *sigh* */
new_off = 0;
GST_DEBUG ("Discont without value - ignoring");
}
audioscale->gst_resample_offset = new_off;
/* fall-through */

View file

@ -233,6 +233,8 @@ gst_stream_selector_request_new_pad (GstElement * element,
name = g_strdup_printf ("sink%d", sel->nb_sinkpads++);
sinkpad = gst_pad_new_from_template (templ, name);
if (sel->nb_sinkpads == 1)
sel->last_active_sinkpad = sinkpad;
g_free (name);
gst_pad_set_link_function (sinkpad,