protocol-native: initialize fields

Set some of the fields to default values.

Fixes #2852
This commit is contained in:
Wim Taymans 2022-11-24 09:40:14 +01:00
parent c939a9edf7
commit be1d4940a3

View file

@ -556,6 +556,8 @@ static int client_node_demarshal_port_use_buffers(void *data, const struct pw_pr
SPA_POD_Id(&m->type),
SPA_POD_Int(&m->size), NULL) < 0)
return -EINVAL;
m->data = NULL;
}
if (spa_pod_parser_get(&prs,
SPA_POD_Int(&buf->n_datas), NULL) < 0)
@ -576,7 +578,9 @@ static int client_node_demarshal_port_use_buffers(void *data, const struct pw_pr
SPA_POD_Int(&d->maxsize), NULL) < 0)
return -EINVAL;
d->fd = -1;
d->data = SPA_UINT32_TO_PTR(data_id);
d->chunk = NULL;
}
}
pw_proxy_notify(proxy, struct pw_client_node_events, port_use_buffers, 0,