properties: fix serialization of values

When the first parsed part of the value does not look like a container,
dump the complete length of the value.

If a value would contain 'Tunnel sink', it would previously only
serialize the 'Tunnel' part and ignore the rest.

See #3212
This commit is contained in:
Wim Taymans 2023-05-12 10:11:41 +02:00
parent 7b0c019a2b
commit 3a08510a81

View file

@ -788,6 +788,9 @@ int pw_properties_serialize_dict(FILE *f, const struct spa_dict *dict, uint32_t
if ((len = spa_json_next(&sub, &value)) < 0) if ((len = spa_json_next(&sub, &value)) < 0)
break; break;
if (!spa_json_is_container(value, len))
len = value ? strlen(value) : 0;
dump(c, c->indent, &sub, value, len); dump(c, c->indent, &sub, value, len);
count++; count++;
} }