multihandlesink: Fix buffers-queued being off by one
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Tue, 29 Nov 2016 14:30:43 +0000 (15:30 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 29 Nov 2016 17:14:10 +0000 (19:14 +0200)
commit58be3093449583d413e94233b27e4b1009b17704
treeac8dbe1fbe1975519081fdb232001333b1f24a7b
parent9bdf7ff6d09fcc308d87196228b9b4d0b84977a0
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
gst/tcp/gstmultihandlesink.c