gst-libs/gst/audio/gstaudiosink.c: Set the worker thread's running flag to TRUE before starting the thread.

Original commit message from CVS:
2005-06-25  Jan Schmidt  <thaytan@mad.scientist.com>
* 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.
This commit is contained in:
Jan Schmidt 2005-06-24 16:15:25 +00:00
parent 4cb699caf6
commit 2255ffd384
3 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2005-06-25 Jan Schmidt <thaytan@mad.scientist.com>
* 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 <thomas at apestaart dot org>
* gst/sine/gstsinesrc.c: (gst_sinesrc_class_init),

View file

@ -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);

View file

@ -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");