+2006-10-13 Wim Taymans <wim@fluendo.com>
+
+ * gst-libs/gst/audio/gstbaseaudiosink.c:
+ (gst_base_audio_sink_setcaps):
+ Don't crash when ringbuffer is not yet created.
+ Patch by: Ville Syrjala <ville dot syrjala at movial dot fi>
+ Fixes #361634.
+
+ * gst/playback/gstplaybasebin.c: (new_decoded_pad_full):
+ * gst/playback/gststreamselector.c:
+ (gst_stream_selector_request_new_pad):
+ Activate pads befre adding them to running elements.
+
2006-10-13 Julien MOUTTE <julien@moutte.net>
* tests/examples/seek/seek.c: (do_seek), (start_seek),
GstBaseAudioSink *sink = GST_BASE_AUDIO_SINK (bsink);
GstRingBufferSpec *spec;
+ if (!sink->ringbuffer)
+ return FALSE;
+
spec = &sink->ringbuffer->spec;
GST_DEBUG_OBJECT (sink, "release old ringbuffer");
/* Store a pointer to the stream selector pad for this stream */
g_object_set_data (G_OBJECT (pad), "pb_sel_pad", sinkpad);
- gst_pad_set_active (sinkpad, TRUE);
gst_pad_link (pad, sinkpad);
gst_object_unref (sinkpad);
GST_LOG_OBJECT (sel, "Creating new pad %d", sel->nb_sinkpads);
+ GST_OBJECT_LOCK (sel);
name = g_strdup_printf ("sink%d", sel->nb_sinkpads++);
sinkpad = gst_pad_new_from_template (templ, name);
g_free (name);
- GST_OBJECT_LOCK (sel);
if (sel->active_sinkpad == NULL)
sel->active_sinkpad = gst_object_ref (sinkpad);
GST_OBJECT_UNLOCK (sel);
gst_pad_set_bufferalloc_function (sinkpad,
GST_DEBUG_FUNCPTR (gst_stream_selector_bufferalloc));
+ gst_pad_set_active (sinkpad, TRUE);
gst_element_add_pad (GST_ELEMENT (sel), sinkpad);
return sinkpad;