diff --git a/ChangeLog b/ChangeLog index 225f89252e..1de7ed3b49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-06-25 Jan Schmidt + * gst-libs/gst/audio/gstaudiosink.c: (gst_audioringbuffer_acquire): + Set the worker thread's running flag to TRUE before starting the + thread. + * gst/playback/gstdecodebin.c: (gst_decode_bin_init): + Catch a failure to add typefind to the bin. + 2005-06-24 Thomas Vander Stichele * gst/sine/gstsinesrc.c: (gst_sinesrc_class_init), diff --git a/gst-libs/gst/audio/gstaudiosink.c b/gst-libs/gst/audio/gstaudiosink.c index 520d7bb557..410b46ca8a 100644 --- a/gst-libs/gst/audio/gstaudiosink.c +++ b/gst-libs/gst/audio/gstaudiosink.c @@ -240,6 +240,7 @@ gst_audioringbuffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec) { GstAudioSink *sink; GstAudioSinkClass *csink; + GstAudioRingBuffer *abuf; gboolean result = FALSE; sink = GST_AUDIOSINK (GST_OBJECT_PARENT (buf)); @@ -257,6 +258,9 @@ gst_audioringbuffer_acquire (GstRingBuffer * buf, GstRingBufferSpec * spec) buf->data = gst_buffer_new_and_alloc (spec->segtotal * spec->segsize); memset (GST_BUFFER_DATA (buf->data), 0, GST_BUFFER_SIZE (buf->data)); + abuf = GST_AUDIORINGBUFFER (buf); + abuf->running = TRUE; + sink->thread = g_thread_create ((GThreadFunc) audioringbuffer_thread_func, buf, TRUE, NULL); diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index fddfb4bf0b..2340a9e0f3 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -312,7 +312,11 @@ gst_decode_bin_init (GstDecodeBin * decode_bin) GstPad *pad; /* add the typefind element */ - gst_bin_add (GST_BIN (decode_bin), decode_bin->typefind); + if (!gst_bin_add (GST_BIN (decode_bin), decode_bin->typefind)) { + g_warning ("Could not add typefind element, decodebin will not work"); + gst_object_unref (GST_OBJECT (decode_bin->typefind)); + decode_bin->typefind = NULL; + } /* get the sinkpad */ pad = gst_element_get_pad (decode_bin->typefind, "sink");