When prerolling/buffering, multiqueue has its buffers limit set
to 0, this means it can take an infinite amount of buffers.
When prerolling/buffering finishes, its limit is set back to 5, but
only if the current level is lower than 5. It should (almost) never be
and this will cause prerolling/buffering to need to wait to reach the
hard bytes and time limits, which are much higher.
This can lead to a very long startup time. This patch fixes this
by setting the single queues to the max(current, new_value) instead
of simply ignoring the new value and letting it as infinite(0)
https://bugzilla.gnome.org/show_bug.cgi?id=712597
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 */
- if (new_size >= size.visible && size.visible <= mq->max_size.visible)
+ if (new_size == 0) {
q->max_size.visible = new_size;
+ } else {
+ q->max_size.visible = MAX (new_size, size.visible);
+ }
tmp = g_list_next (tmp);
};