mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
impl-link: handle mixer failures better
It is possible that the mixer input can't be created because of hitting the max limits of dsp mixer or client-node. Make sure we handle those errors, destroy the link and clean up properly.
This commit is contained in:
parent
a67f38f790
commit
7e387d842b
3 changed files with 38 additions and 25 deletions
|
|
@ -219,6 +219,8 @@ static struct mix *find_mix(struct port *p, uint32_t mix_id)
|
|||
if (mix_id >= len) {
|
||||
size_t need = sizeof(struct mix) * (mix_id + 1 - len);
|
||||
void *ptr = pw_array_add(&p->mix, need);
|
||||
if (ptr == NULL)
|
||||
return NULL;
|
||||
memset(ptr, 0, need);
|
||||
}
|
||||
mix = pw_array_get_unchecked(&p->mix, mix_id, struct mix);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue