mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
properties: use json parse_string
So that properties with object values get stripped properly.
This commit is contained in:
parent
78e2e2c27b
commit
b61c4a88c4
1 changed files with 1 additions and 4 deletions
|
|
@ -172,10 +172,7 @@ int pw_properties_update_string(struct pw_properties *props, const char *str, si
|
|||
if (spa_json_is_container(value, len))
|
||||
len = spa_json_container_len(&it[1], value, len);
|
||||
|
||||
if ((val = strndup(value, len)) == NULL)
|
||||
return -errno;
|
||||
|
||||
if (spa_json_is_string(value, len))
|
||||
if ((val = malloc(len)) != NULL)
|
||||
spa_json_parse_string(value, len, val);
|
||||
}
|
||||
count += pw_properties_set(&impl->this, key, val);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue