Rearranged the mutex locking, still have to think about it though...

Original commit message from CVS:
Rearranged the mutex locking, still have to think about it though...
This commit is contained in:
Wim Taymans 2001-01-06 19:09:40 +00:00
parent f130a170c2
commit 372b6f5887
2 changed files with 4 additions and 4 deletions

View file

@ -195,11 +195,11 @@ gst_queue_chain (GstPad *pad, GstBuffer *buf)
while (queue->level_buffers >= queue->max_buffers) {
GST_DEBUG (0,"queue: %s waiting %d\n", name, queue->level_buffers);
STATUS("%s: O\n");
GST_UNLOCK (queue);
g_mutex_lock (queue->fulllock);
GST_UNLOCK (queue);
g_cond_wait (queue->fullcond, queue->fulllock);
g_mutex_unlock (queue->fulllock);
GST_LOCK (queue);
g_mutex_unlock (queue->fulllock);
STATUS("%s: O+\n");
GST_DEBUG (0,"queue: %s waiting done %d\n", name, queue->level_buffers);
}

View file

@ -195,11 +195,11 @@ gst_queue_chain (GstPad *pad, GstBuffer *buf)
while (queue->level_buffers >= queue->max_buffers) {
GST_DEBUG (0,"queue: %s waiting %d\n", name, queue->level_buffers);
STATUS("%s: O\n");
GST_UNLOCK (queue);
g_mutex_lock (queue->fulllock);
GST_UNLOCK (queue);
g_cond_wait (queue->fullcond, queue->fulllock);
g_mutex_unlock (queue->fulllock);
GST_LOCK (queue);
g_mutex_unlock (queue->fulllock);
STATUS("%s: O+\n");
GST_DEBUG (0,"queue: %s waiting done %d\n", name, queue->level_buffers);
}