Commit 9b139e41 authored by Ville Syrjala's avatar Ville Syrjala Committed by Wim Taymans
Browse files

gst-libs/gst/audio/gstbaseaudiosink.c: Don't crash when ringbuffer is not yet created.

Original commit message from CVS:
* 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.
parent 9e9538c6
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),
......@@ -316,6 +316,9 @@ gst_base_audio_sink_setcaps (GstBaseSink * bsink, GstCaps * caps)
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");
......
......@@ -1205,7 +1205,6 @@ new_decoded_pad_full (GstElement * element, GstPad * pad, gboolean last,
/* 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);
......
......@@ -354,11 +354,11 @@ gst_stream_selector_request_new_pad (GstElement * element,
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);
......@@ -372,6 +372,7 @@ gst_stream_selector_request_new_pad (GstElement * element,
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment