diff --git a/ChangeLog b/ChangeLog index ebb1c0d232..da5f51f1d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-03-24 Wim Taymans + + * 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 Patch by: José Alburquerque diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c index c74189b9ca..a679262219 100644 --- a/plugins/elements/gstmultiqueue.c +++ b/plugins/elements/gstmultiqueue.c @@ -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);