plugins/elements/gstmultiqueue.c: When trying to make room in the queue, bump the...
authorWim Taymans <wim.taymans@gmail.com>
Mon, 24 Mar 2008 10:38:31 +0000 (10:38 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Mon, 24 Mar 2008 10:38:31 +0000 (10:38 +0000)
Original commit message from CVS:
* plugins/elements/gstmultiqueue.c: (single_queue_overrun_cb),
(single_queue_underrun_cb):
When trying to make room in the queue, bump the max allowed buffers
bigger than the current amount of buffers in the queue. this fixes some
nasty deadlocks in multiqueue when dynamically changing the limits of
the queue.

ChangeLog
plugins/elements/gstmultiqueue.c

index ebb1c0d..da5f51f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2008-03-24  Wim Taymans  <wim.taymans@collabora.co.uk>
 
+       * plugins/elements/gstmultiqueue.c: (single_queue_overrun_cb),
+       (single_queue_underrun_cb):
+       When trying to make room in the queue, bump the max allowed buffers
+       bigger than the current amount of buffers in the queue. this fixes some
+       nasty deadlocks in multiqueue when dynamically changing the limits of
+       the queue.
+
+2008-03-24  Wim Taymans  <wim.taymans@collabora.co.uk>
+
        Patch by:  José Alburquerque <jaalburqu at svn dot gnome dot org>
 
        * gst/gstcaps.c: (gst_caps_set_simple),
index c74189b..a679262 100644 (file)
@@ -1267,7 +1267,7 @@ single_queue_overrun_cb (GstDataQueue * dq, GstSingleQueue * sq)
     if (gst_data_queue_is_empty (ssq->queue)) {
       GST_LOG_OBJECT (mq, "Queue %d is empty", ssq->id);
       if (IS_FILLED (visible, size.visible)) {
-        sq->max_size.visible++;
+        sq->max_size.visible = size.visible + 1;
         GST_DEBUG_OBJECT (mq,
             "Another queue is empty, bumping single queue %d max visible to %d",
             sq->id, sq->max_size.visible);
@@ -1321,7 +1321,7 @@ single_queue_underrun_cb (GstDataQueue * dq, GstSingleQueue * sq)
 
       gst_data_queue_get_level (sq->queue, &size);
       if (IS_FILLED (visible, size.visible)) {
-        sq->max_size.visible++;
+        sq->max_size.visible = size.visible + 1;
         GST_DEBUG_OBJECT (mq,
             "queue %d is filled, bumping its max visible to %d", sq->id,
             sq->max_size.visible);