From 3a08510a819ed8a1c5a732815f462c7b78f06eb6 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 12 May 2023 10:11:41 +0200 Subject: [PATCH] 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 --- src/pipewire/properties.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pipewire/properties.c b/src/pipewire/properties.c index 7bc7c6b8d..cce9c6f1b 100644 --- a/src/pipewire/properties.c +++ b/src/pipewire/properties.c @@ -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) break; + if (!spa_json_is_container(value, len)) + len = value ? strlen(value) : 0; + dump(c, c->indent, &sub, value, len); count++; }