From 237c0197c63bd092b8d44cbe31b0663dbf63e065 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 30 Apr 2025 12:20:31 +0200 Subject: [PATCH] filter-chain: add props only once Only add the properties offset in the builder after we actually got a property or else we end up with the same property twice. --- src/modules/module-filter-chain.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/module-filter-chain.c b/src/modules/module-filter-chain.c index 1446cc437..537b8c7d0 100644 --- a/src/modules/module-filter-chain.c +++ b/src/modules/module-filter-chain.c @@ -1153,10 +1153,11 @@ static int setup_streams(struct impl *impl) SPA_PARAM_EnumFormat, &impl->capture_info); for (i = 0;; i++) { - if ((offs = pw_array_add(&offsets, sizeof(uint32_t))) != NULL) - *offs = b.b.state.offset; + uint32_t save = b.b.state.offset; if (spa_filter_graph_enum_prop_info(graph, i, &b.b, NULL) != 1) break; + if ((offs = pw_array_add(&offsets, sizeof(uint32_t))) != NULL) + *offs = save; } if ((offs = pw_array_add(&offsets, sizeof(uint32_t))) != NULL)