mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
client-node: refuse the wrong amount of client buffers
Make sure we get the same amount of buffers from the client as we asked to allocate.
This commit is contained in:
parent
bb1cb530fc
commit
c04a9b546d
1 changed files with 3 additions and 0 deletions
|
|
@ -1028,6 +1028,9 @@ static int client_node_port_buffers(void *data,
|
||||||
if ((mix = find_mix(p, mix_id)) == NULL || !mix->valid)
|
if ((mix = find_mix(p, mix_id)) == NULL || !mix->valid)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (mix->n_buffers != n_buffers)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
for (i = 0; i < n_buffers; i++) {
|
for (i = 0; i < n_buffers; i++) {
|
||||||
struct spa_buffer *oldbuf, *newbuf;
|
struct spa_buffer *oldbuf, *newbuf;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue