plugins/elements/gstmultiqueue.c: When trying to make room in the queue, bump the max allowed buffers bigger than the...

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.
This commit is contained in:
Wim Taymans 2008-03-24 10:38:31 +00:00
parent 126b82fc47
commit 60da0d3654
2 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,12 @@
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>

View 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);