mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
multiqueue: prevent buffering forever with playbin
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
This commit is contained in:
parent
1d6136b930
commit
139c96c129
1 changed files with 4 additions and 1 deletions
|
@ -508,8 +508,11 @@ gst_multi_queue_set_property (GObject * object, guint prop_id,
|
|||
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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue