From 1b94b66924256c3321f947129efbca200a7d4e04 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 3 Dec 2021 16:41:41 +0100 Subject: [PATCH] pulse-server: always asks for more data when underrun Even when prebuffer is active, we need to ask for more data to resolve the underrun. --- src/modules/module-protocol-pulse/pulse-server.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 03bbd1d46..977f9f714 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -1241,7 +1241,6 @@ static void stream_process(void *data) pd.underrun = true; } if (stream->attr.prebuf == 0 && !stream->corked) { - pd.missing = size; pd.playing_for = size; if (avail > 0) { index += avail; @@ -1249,8 +1248,9 @@ static void stream_process(void *data) } spa_ringbuffer_read_update(&stream->ring, index); } - pw_log_debug("%p: [%s] underrun read:%u avail:%d max:%u", - stream, client->name, index, avail, minreq); + pd.missing = size; + pw_log_debug("%p: [%s] underrun read:%u avail:%d max:%u size:%u missing:%u", + stream, client->name, index, avail, minreq, size, pd.missing); } else { if (avail > (int32_t)stream->attr.maxlength) { uint32_t skip = avail - stream->attr.maxlength;