mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: Fix underrun check
We're underrun when we can't produce the required number of samples. See #617
This commit is contained in:
parent
96d98c7955
commit
c913abffef
1 changed files with 1 additions and 1 deletions
|
|
@ -1545,7 +1545,7 @@ static void stream_process(void *data)
|
||||||
else
|
else
|
||||||
minreq = SPA_MAX(stream->minblock, stream->attr.minreq);
|
minreq = SPA_MAX(stream->minblock, stream->attr.minreq);
|
||||||
|
|
||||||
if (avail <= 0) {
|
if (avail < (int32_t)minreq) {
|
||||||
/* underrun, produce a silence buffer */
|
/* underrun, produce a silence buffer */
|
||||||
size = SPA_MIN(buf->datas[0].maxsize, minreq);
|
size = SPA_MIN(buf->datas[0].maxsize, minreq);
|
||||||
memset(p, 0, size);
|
memset(p, 0, size);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue