audioadapter: alloc at least 2 buffers when async

When the follower is async, alloc at least 2 buffers.
This commit is contained in:
Wim Taymans 2023-10-13 13:59:34 +02:00
parent 8e95f1a575
commit 9163c419df

View file

@ -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);