diff --git a/spa/plugins/audioconvert/merger.c b/spa/plugins/audioconvert/merger.c index 9392bd7ec..d0df3dd91 100644 --- a/spa/plugins/audioconvert/merger.c +++ b/spa/plugins/audioconvert/merger.c @@ -135,11 +135,18 @@ static int init_port(struct impl *this, uint32_t port_id, uint32_t rate, uint32_ static int impl_node_enum_params(struct spa_node *node, uint32_t id, uint32_t *index, const struct spa_pod *filter, - struct spa_pod **param, + struct spa_pod **result, struct spa_pod_builder *builder) { + struct spa_pod *param; + struct spa_pod_builder b = { 0 }; + uint8_t buffer[1024]; + spa_return_val_if_fail(node != NULL, -EINVAL); + next: + spa_pod_builder_init(&b, buffer, sizeof(buffer)); + switch (id) { case SPA_PARAM_List: { @@ -159,6 +166,9 @@ static int impl_node_enum_params(struct spa_node *node, } (*index)++; + if (spa_pod_filter(builder, result, param, filter) < 0) + goto next; + return 1; } diff --git a/spa/plugins/audioconvert/splitter.c b/spa/plugins/audioconvert/splitter.c index 01c8116e1..9e42220d8 100644 --- a/spa/plugins/audioconvert/splitter.c +++ b/spa/plugins/audioconvert/splitter.c @@ -139,11 +139,18 @@ static int init_port(struct impl *this, uint32_t port_id, uint32_t rate, uint32_ static int impl_node_enum_params(struct spa_node *node, uint32_t id, uint32_t *index, const struct spa_pod *filter, - struct spa_pod **param, + struct spa_pod **result, struct spa_pod_builder *builder) { + struct spa_pod *param; + struct spa_pod_builder b = { 0 }; + uint8_t buffer[1024]; + spa_return_val_if_fail(node != NULL, -EINVAL); + next: + spa_pod_builder_init(&b, buffer, sizeof(buffer)); + switch (id) { case SPA_PARAM_List: { @@ -163,6 +170,9 @@ static int impl_node_enum_params(struct spa_node *node, } (*index)++; + if (spa_pod_filter(builder, result, param, filter) < 0) + goto next; + return 1; }