This hopefully fixes a slight thread sync issue.

Original commit message from CVS:
This hopefully fixes a slight thread sync issue.
This commit is contained in:
Wim Taymans 2001-03-30 19:52:27 +00:00
parent c3abf67bcb
commit c7d631ff34

View file

@ -249,12 +249,15 @@ gst_thread_change_state (GstElement *element)
GST_INFO (GST_CAT_THREAD, "gstthread: starting thread \"%s\"",
GST_ELEMENT_NAME (GST_ELEMENT (element)));
g_mutex_lock (thread->lock);
// create the thread
pthread_create (&thread->thread_id, NULL,
gst_thread_main_loop, thread);
// wait for it to 'spin up'
//gst_thread_wait_thread (thread);
g_cond_wait (thread->cond, thread->lock);
g_mutex_unlock (thread->lock);
} else {
GST_INFO (GST_CAT_THREAD, "gstthread: NOT starting thread \"%s\"",
GST_ELEMENT_NAME (GST_ELEMENT (element)));