stream: set param id

The param id in the object is used to filter on the server so make
sure it is set in the object correctly.
This commit is contained in:
Wim Taymans 2020-02-08 21:48:28 +01:00
parent cb1071bce7
commit 087448ff0f

View file

@ -167,6 +167,7 @@ static struct param *add_param(struct stream *impl,
p->id = id; p->id = id;
p->param = SPA_MEMBER(p, sizeof(struct param), struct spa_pod); p->param = SPA_MEMBER(p, sizeof(struct param), struct spa_pod);
memcpy(p->param, param, SPA_POD_SIZE(param)); memcpy(p->param, param, SPA_POD_SIZE(param));
SPA_POD_OBJECT_ID(p->param) = id;
spa_list_append(&impl->param_list, &p->link); spa_list_append(&impl->param_list, &p->link);
@ -492,7 +493,7 @@ static int impl_port_enum_params(void *object, int seq,
result.index = result.next++; result.index = result.next++;
param = p->param; param = p->param;
if (param == NULL || !spa_pod_is_object_id(param, id)) if (param == NULL || p->id != id)
continue; continue;
spa_pod_builder_init(&b, buffer, sizeof(buffer)); spa_pod_builder_init(&b, buffer, sizeof(buffer));