From 9163c419df0211bc78fab7c720abcb6831952352 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 13 Oct 2023 13:59:34 +0200 Subject: [PATCH] audioadapter: alloc at least 2 buffers when async When the follower is async, alloc at least 2 buffers. --- spa/plugins/audioconvert/audioadapter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spa/plugins/audioconvert/audioadapter.c b/spa/plugins/audioconvert/audioadapter.c index a037bb9ff..4709ab6d3 100644 --- a/spa/plugins/audioconvert/audioadapter.c +++ b/spa/plugins/audioconvert/audioadapter.c @@ -432,6 +432,9 @@ static int negotiate_buffers(struct impl *this) SPA_PARAM_BUFFERS_align, SPA_POD_OPT_Int(&align))) < 0) return res; + if (this->async) + buffers = SPA_MAX(2u, buffers); + spa_log_debug(this->log, "%p: buffers:%d, blocks:%d, size:%d, stride:%d align:%d %d:%d", this, buffers, blocks, size, stride, align, follower_alloc, conv_alloc);