mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
multihandlesink: Fix buffers-queued being off by one
max_buffer_usage is the index of the oldest buffer in the queue, starting at zero, not the number of buffers queued. find_limits returns the index of the oldest buffer that satisfies the limits in its min_idx parameter, not the number of buffers needed. Fix this use too in order to keep passing the tests that read buffers-queued. https://bugzilla.gnome.org/show_bug.cgi?id=775351
This commit is contained in:
parent
9bdf7ff6d0
commit
58be309344
1 changed files with 2 additions and 2 deletions
|
@ -1791,7 +1791,7 @@ restart:
|
|||
find_limits (mhsink, &usage, mhsink->bytes_min, mhsink->buffers_min,
|
||||
mhsink->time_min, &max, -1, -1, -1);
|
||||
|
||||
max_buffer_usage = MAX (max_buffer_usage, usage + 1);
|
||||
max_buffer_usage = MAX (max_buffer_usage, usage);
|
||||
GST_LOG_OBJECT (sink, "extended queue to %d", max_buffer_usage);
|
||||
}
|
||||
|
||||
|
@ -1840,7 +1840,7 @@ restart:
|
|||
gst_buffer_unref (old);
|
||||
}
|
||||
/* save for stats */
|
||||
mhsink->buffers_queued = max_buffer_usage;
|
||||
mhsink->buffers_queued = max_buffer_usage + 1;
|
||||
CLIENTS_UNLOCK (sink);
|
||||
|
||||
/* and send a signal to thread if handle_set changed */
|
||||
|
|
Loading…
Reference in a new issue