summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Vrac <avrac@freebox.fr>2014-01-24 19:19:08 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-02-04 17:01:41 +0100
commit7e3815e3ab204f31118af36f567790087a665679 (patch)
treee17e235c3a68582f19b2b4c033763559bd519a4d
parenta7420fe0ec572e25f9dee41ce3548222c5ba951a (diff)
downloadgstreamer-7e3815e3ab204f31118af36f567790087a665679.tar.gz
multiqueue: do not reduce single queue below current level
When the single queue size was just bumped by 1 to allow more buffers to be added, the buffers limit could be reduced to the current level when setting the max-size-buffers property. This would result in a stall since the queue would not grow anymore at this point. Prevent this by not reducing a single queue size below the current number of buffers + 1. https://bugzilla.gnome.org/show_bug.cgi?id=712597
-rw-r--r--plugins/elements/gstmultiqueue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c
index 8d2a60b08e..df0c65d086 100644
--- a/plugins/elements/gstmultiqueue.c
+++ b/plugins/elements/gstmultiqueue.c
@@ -510,8 +510,8 @@ gst_multi_queue_set_property (GObject * object, guint prop_id,
/* do not reduce max size below current level if the single queue has grown because of empty queue */
if (new_size == 0) {
q->max_size.visible = new_size;
- } else {
- q->max_size.visible = MAX (new_size, size.visible);
+ } else if (new_size > size.visible) {
+ q->max_size.visible = new_size;
}
tmp = g_list_next (tmp);
};