mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
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:
parent
c3abf67bcb
commit
c7d631ff34
1 changed files with 3 additions and 0 deletions
|
@ -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)));
|
||||
|
|
Loading…
Reference in a new issue