multiqueue: prevent buffering forever with playbin
authorThiago Santos <ts.santos@sisa.samsung.com>
Wed, 15 Jan 2014 03:12:26 +0000 (00:12 -0300)
committerThiago Santos <ts.santos@sisa.samsung.com>
Wed, 15 Jan 2014 12:51:35 +0000 (09:51 -0300)
commit139c96c129149266669c9799ad3b30d84f62065b
treec277e47cf32183d3472234b9c598fe8e468c3511
parent1d6136b9301030ac517c75cc4bda6048ec2b8bd8
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
plugins/elements/gstmultiqueue.c