mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04: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)
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue