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.
This commit is contained in:
Wim Taymans 2021-12-03 16:41:41 +01:00
parent 97cad7284a
commit 1b94b66924

View file

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