merger: fix enum_param

This commit is contained in:
Wim Taymans 2018-11-21 12:18:56 +01:00
parent b27206c24a
commit 5e8d9fb196
2 changed files with 22 additions and 2 deletions

View file

@ -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;
}