pulse-server: handle prebuf better

prebuf == 0 should keep the read pointer updating
prebuf > 0 should pause
This commit is contained in:
Wim Taymans 2021-01-30 19:45:17 +01:00
parent 98dab7903a
commit d37742b410

View file

@ -1569,9 +1569,12 @@ static void stream_process(void *data)
pw_stream_flush(stream->stream, true);
} else {
pd.underrun_for = size;
pd.playing_for = size;
pd.underrun = true;
}
if (stream->attr.prebuf == 0) {
pd.read_index += size;
spa_ringbuffer_read_update(&stream->ring, pd.read_index);
}
} else {
if (avail > (int32_t)stream->attr.maxlength) {
/* overrun, reported by other side, here we skip