mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
audiomixer: only overwrite OK status
When the mixer has no bytes queued, only ask for more bytes when we were in the OK status otherwise we might override the HAVE_BUFFER status and discard the queued buffer.
This commit is contained in:
parent
01d8fdc1bf
commit
95b3cba3c3
1 changed files with 4 additions and 5 deletions
|
|
@ -1049,15 +1049,14 @@ static int impl_node_process_output(struct spa_node *node)
|
|||
if ((inio = inport->io) == NULL || inport->n_buffers == 0)
|
||||
continue;
|
||||
|
||||
if (inport->queued_bytes == 0) {
|
||||
spa_log_trace(this->log, NAME " %p: port %d queued %zd, res %d", this,
|
||||
i, inport->queued_bytes, inio->status);
|
||||
|
||||
if (inport->queued_bytes == 0 && inio->status == SPA_STATUS_OK) {
|
||||
if (inport->io_range && outport->io_range)
|
||||
*inport->io_range = *outport->io_range;
|
||||
inio->status = SPA_STATUS_NEED_BUFFER;
|
||||
} else {
|
||||
inio->status = SPA_STATUS_OK;
|
||||
}
|
||||
spa_log_trace(this->log, NAME " %p: port %d queued %zd, res %d", this,
|
||||
i, inport->queued_bytes, inio->status);
|
||||
}
|
||||
}
|
||||
return outio->status;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue