mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 07:28:53 +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_INFO (GST_CAT_THREAD, "gstthread: starting thread \"%s\"",
|
||||||
GST_ELEMENT_NAME (GST_ELEMENT (element)));
|
GST_ELEMENT_NAME (GST_ELEMENT (element)));
|
||||||
|
|
||||||
|
g_mutex_lock (thread->lock);
|
||||||
// create the thread
|
// create the thread
|
||||||
pthread_create (&thread->thread_id, NULL,
|
pthread_create (&thread->thread_id, NULL,
|
||||||
gst_thread_main_loop, thread);
|
gst_thread_main_loop, thread);
|
||||||
|
|
||||||
// wait for it to 'spin up'
|
// wait for it to 'spin up'
|
||||||
//gst_thread_wait_thread (thread);
|
//gst_thread_wait_thread (thread);
|
||||||
|
g_cond_wait (thread->cond, thread->lock);
|
||||||
|
g_mutex_unlock (thread->lock);
|
||||||
} else {
|
} else {
|
||||||
GST_INFO (GST_CAT_THREAD, "gstthread: NOT starting thread \"%s\"",
|
GST_INFO (GST_CAT_THREAD, "gstthread: NOT starting thread \"%s\"",
|
||||||
GST_ELEMENT_NAME (GST_ELEMENT (element)));
|
GST_ELEMENT_NAME (GST_ELEMENT (element)));
|
||||||
|
|
Loading…
Reference in a new issue