From c913abffef60b4d035ee440a1f48a91a8364f57e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 24 Jan 2021 20:32:14 +0100 Subject: [PATCH] pulse-server: Fix underrun check We're underrun when we can't produce the required number of samples. See #617 --- src/modules/module-protocol-pulse/pulse-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 41d9f42ad..8fa3642fe 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -1545,7 +1545,7 @@ static void stream_process(void *data) else minreq = SPA_MAX(stream->minblock, stream->attr.minreq); - if (avail <= 0) { + if (avail < (int32_t)minreq) { /* underrun, produce a silence buffer */ size = SPA_MIN(buf->datas[0].maxsize, minreq); memset(p, 0, size);