From a00c00baed6984b07e396cacfeba14c09e43102e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 9 Oct 2018 17:31:06 +0200 Subject: [PATCH] stream: maxlength / size is the number of buffers we want tlength is what the server buffers and is of no importance for deciding the number of buffers. --- src/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stream.c b/src/stream.c index 3472c46fe..97df07eb9 100644 --- a/src/stream.c +++ b/src/stream.c @@ -283,7 +283,7 @@ static const struct spa_pod *get_buffers_param(pa_stream *s, pa_buffer_attr *att if (attr->maxlength == -1) buffers = 3; else - buffers = SPA_CLAMP(attr->maxlength / (maxsize * stride), 3, MAX_BUFFERS); + buffers = SPA_CLAMP(attr->maxlength / (size * stride), 3, MAX_BUFFERS); pw_log_info("stream %p: stride %d maxsize %d size %u buffers %d", s, stride, maxsize, size, buffers);