mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: don't read more than requested size
When we underrun, don't try to read more than what was requested even if there is more in the ringbuffer.
This commit is contained in:
parent
2d858e0ba2
commit
e0d1be32fd
1 changed files with 1 additions and 1 deletions
|
|
@ -1422,7 +1422,7 @@ static void stream_process(void *data)
|
||||||
spa_ringbuffer_read_data(&stream->ring,
|
spa_ringbuffer_read_data(&stream->ring,
|
||||||
stream->buffer, MAXLENGTH,
|
stream->buffer, MAXLENGTH,
|
||||||
index % MAXLENGTH,
|
index % MAXLENGTH,
|
||||||
p, avail);
|
p, SPA_MIN((uint32_t)avail, size));
|
||||||
index += avail;
|
index += avail;
|
||||||
}
|
}
|
||||||
pd.playing_for = size;
|
pd.playing_for = size;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue