mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
modules: limit the max amount of items in the protocol
For now, put a limit on the amount of items we can send and receive over the native protocol. A more complex way of allocating and freeing can be implemented later when we really need to raise the limits. Fixes #2070
This commit is contained in:
parent
92198e4d0d
commit
ead827d6cb
6 changed files with 70 additions and 2 deletions
|
|
@ -755,6 +755,9 @@ do_port_use_buffers(struct impl *impl,
|
|||
if (!CHECK_PORT(this, direction, port_id))
|
||||
return n_buffers == 0 ? 0 : -EINVAL;
|
||||
|
||||
if (n_buffers > MAX_BUFFERS)
|
||||
return -ENOSPC;
|
||||
|
||||
p = GET_PORT(this, direction, port_id);
|
||||
|
||||
spa_log_debug(this->log, "%p: %s port %d.%d use buffers %p %u flags:%08x", this,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue