mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
properties: handle prealloc of 0
The argument to array_init is not the prealloc but the extend, so passing 0 will not work
This commit is contained in:
parent
086166058a
commit
e4f58da013
1 changed files with 2 additions and 1 deletions
|
|
@ -75,7 +75,8 @@ static struct properties *properties_new(int prealloc)
|
||||||
if (impl == NULL)
|
if (impl == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
pw_array_init(&impl->items, prealloc);
|
pw_array_init(&impl->items, 16);
|
||||||
|
pw_array_ensure_size(&impl->items, sizeof(struct spa_dict_item) * prealloc);
|
||||||
|
|
||||||
return impl;
|
return impl;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue