multiqueue: Ignore time when determining whether sparse stream limits have been reached

Basically, sq->max_size.visible is never increased for sparse streams in
overruncb when empty queue has been found;

If the queue is sparse it just skip the entire logic determining whether
max_size.visible should be increased, deadlocking the demuxer.

What should be done instead is that when determining if limits have been
reached, to ignore time for sparse streams, as the buffer may be far in the
future.

https://bugzilla.gnome.org/show_bug.cgi?id=765736
This commit is contained in:
Matej Knopp 2016-04-29 14:55:02 +02:00 committed by Sebastian Dröge
parent 8177173db0
commit efb1955ffb

View file

@ -2449,9 +2449,10 @@ single_queue_overrun_cb (GstDataQueue * dq, GstSingleQueue * sq)
GST_MULTI_QUEUE_MUTEX_LOCK (mq);
/* check if we reached the hard time/bytes limits */
if (sq->is_eos || sq->is_sparse || IS_FILLED (sq, bytes, size.bytes) ||
IS_FILLED (sq, time, sq->cur_time)) {
/* check if we reached the hard time/bytes limits;
time limit is only taken into account for non-sparse streams */
if (sq->is_eos || IS_FILLED (sq, bytes, size.bytes) ||
(!sq->is_sparse && IS_FILLED (sq, time, sq->cur_time))) {
goto done;
}