mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
pulse-server: always advance the read pointer in underrun
We should always advance the read pointer when we are underrun and not corked. This will request more bytes from the client to make things advance. Fixes #2041
This commit is contained in:
parent
b9c8f0f6b9
commit
db2719f1f4
1 changed files with 3 additions and 3 deletions
|
|
@ -1253,15 +1253,15 @@ static void stream_process(void *data)
|
|||
pd.underrun = true;
|
||||
}
|
||||
if ((stream->attr.prebuf == 0 || do_flush) && !stream->corked) {
|
||||
pd.playing_for = size;
|
||||
if (avail > 0) {
|
||||
spa_ringbuffer_read_data(&stream->ring,
|
||||
stream->buffer, stream->attr.maxlength,
|
||||
index % stream->attr.maxlength,
|
||||
p, avail);
|
||||
index += avail;
|
||||
pd.read_inc = avail;
|
||||
}
|
||||
pd.playing_for = size;
|
||||
pd.read_inc = size;
|
||||
index += size;
|
||||
spa_ringbuffer_read_update(&stream->ring, index);
|
||||
}
|
||||
pw_log_debug("%p: [%s] underrun read:%u avail:%d max:%u",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue