4 while (!queue->level_buffers) {
5 STATUS("queue: %s U released lock\n");
6 GST_OBJECT_UNLOCK (queue);
8 // thread1 is scheduled and puts a lot of buffers
11 // thread1 has put the last buffer on the queue
12 // here. A signal is going to be emited
14 tosignal = (queue->level_buffers >= 0);
15 queue->level_buffers++;
17 /* we can unlock now */
18 GST_OBJECT_UNLOCK (queue);
21 g_mutex_lock (queue->emptylock);
22 g_cond_signal (queue->emptycond);
23 g_mutex_unlock (queue->emptylock);
26 g_mutex_lock (queue->emptylock);
28 g_cond_wait (queue->emptycond, queue->emptylock);
29 g_mutex_unlock (queue->emptylock);
30 GST_OBJECT_LOCK (queue);
34 // thread 1 will also wait forever because the
35 // queue is filled....