mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
multiqueue: avoid using infinite buffers limit if finite is requested
If the current max-buffers limit it infinite and a finite value is requested, switch to the MAX (requested, current-value) to set some limit but not below what we know that we've needed so far. https://bugzilla.gnome.org/show_bug.cgi?id=733637 https://bugzilla.gnome.org/show_bug.cgi?id=733837
This commit is contained in:
parent
0887020581
commit
463ccd96eb
1 changed files with 8 additions and 1 deletions
|
@ -514,9 +514,16 @@ gst_multi_queue_set_property (GObject * object, guint prop_id,
|
|||
GstSingleQueue *q = (GstSingleQueue *) tmp->data;
|
||||
gst_data_queue_get_level (q->queue, &size);
|
||||
|
||||
/* do not reduce max size below current level if the single queue has grown because of empty queue */
|
||||
GST_DEBUG_OBJECT (mq, "Queue %d: Requested buffers size: %d,"
|
||||
" current: %d, current max %d", q->id, new_size, size.visible,
|
||||
q->max_size.visible);
|
||||
|
||||
/* 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 if (q->max_size.visible == 0) {
|
||||
q->max_size.visible = MAX (new_size, size.visible);
|
||||
} else if (new_size > size.visible) {
|
||||
q->max_size.visible = new_size;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue