stream: handle set_control when not connected

When we are not connected, return -EIO from set_control instead
of crashing later.
This commit is contained in:
Wim Taymans 2022-05-10 15:36:00 +02:00
parent 4efb1a03cb
commit e6c2ac3450

View file

@ -2081,6 +2081,9 @@ int pw_stream_set_control(struct pw_stream *stream, uint32_t id, uint32_t n_valu
struct spa_pod *pod; struct spa_pod *pod;
struct control *c; struct control *c;
if (impl->node == NULL)
return -EIO;
va_start(varargs, values); va_start(varargs, values);
spa_pod_builder_push_object(&b, &f[0], SPA_TYPE_OBJECT_Props, SPA_PARAM_Props); spa_pod_builder_push_object(&b, &f[0], SPA_TYPE_OBJECT_Props, SPA_PARAM_Props);