mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05:00
port: don't try to negotiate 0 buffers
Don't try to negotiate buffers when we are clearing the buffers.
This commit is contained in:
parent
d39dbceb2a
commit
09186844c4
1 changed files with 12 additions and 10 deletions
|
|
@ -1208,17 +1208,19 @@ static int negotiate_mixer_buffers(struct pw_impl_port *port, uint32_t flags,
|
||||||
|
|
||||||
pw_buffers_clear(&port->mix_buffers);
|
pw_buffers_clear(&port->mix_buffers);
|
||||||
|
|
||||||
if ((res = pw_buffers_negotiate(node->context, alloc_flags,
|
if (n_buffers > 0) {
|
||||||
port->mix, 0,
|
if ((res = pw_buffers_negotiate(node->context, alloc_flags,
|
||||||
node->node, port->port_id,
|
port->mix, 0,
|
||||||
&port->mix_buffers)) < 0) {
|
node->node, port->port_id,
|
||||||
pw_log_warn(NAME" %p: can't negotiate buffers: %s",
|
&port->mix_buffers)) < 0) {
|
||||||
port, spa_strerror(res));
|
pw_log_warn(NAME" %p: can't negotiate buffers: %s",
|
||||||
return res;
|
port, spa_strerror(res));
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
buffers = port->mix_buffers.buffers;
|
||||||
|
n_buffers = port->mix_buffers.n_buffers;
|
||||||
|
flags = 0;
|
||||||
}
|
}
|
||||||
buffers = port->mix_buffers.buffers;
|
|
||||||
n_buffers = port->mix_buffers.n_buffers;
|
|
||||||
flags = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pw_log_debug(NAME" %p: %d.%d use buffers on node: %p",
|
pw_log_debug(NAME" %p: %d.%d use buffers on node: %p",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue