mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-18 08:56:45 -05:00
map: scale extend with the item size as well
This commit is contained in:
parent
9bebad6ed3
commit
f743aecd23
1 changed files with 1 additions and 1 deletions
|
|
@ -115,7 +115,7 @@ struct pw_map {
|
||||||
*/
|
*/
|
||||||
static inline void pw_map_init(struct pw_map *map, size_t size, size_t extend)
|
static inline void pw_map_init(struct pw_map *map, size_t size, size_t extend)
|
||||||
{
|
{
|
||||||
pw_array_init(&map->items, extend);
|
pw_array_init(&map->items, extend * sizeof(union pw_map_item));
|
||||||
pw_array_ensure_size(&map->items, size * sizeof(union pw_map_item));
|
pw_array_ensure_size(&map->items, size * sizeof(union pw_map_item));
|
||||||
map->free_list = SPA_ID_INVALID;
|
map->free_list = SPA_ID_INVALID;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue