mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
client-node: first set param, then clear buffers
Because setting the param might still access the buffer to do cleanup.
This commit is contained in:
parent
33cd2495b8
commit
8292c556e9
1 changed files with 7 additions and 7 deletions
|
|
@ -558,9 +558,13 @@ client_node_port_set_param(void *object,
|
||||||
goto error_exit;
|
goto error_exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
pw_log_debug("port %p: set param %d %p", port, id, param);
|
pw_log_debug("port %p: set param %d %p", port, id, param);
|
||||||
|
|
||||||
if (id == SPA_PARAM_Format) {
|
res = pw_impl_port_set_param(port, id, flags, param);
|
||||||
|
if (res < 0)
|
||||||
|
goto error_exit;
|
||||||
|
|
||||||
|
if (id == SPA_PARAM_Format) {
|
||||||
struct mix *mix;
|
struct mix *mix;
|
||||||
spa_list_for_each(mix, &data->mix[direction], link) {
|
spa_list_for_each(mix, &data->mix[direction], link) {
|
||||||
if (mix->port->port_id == port_id)
|
if (mix->port->port_id == port_id)
|
||||||
|
|
@ -568,14 +572,10 @@ client_node_port_set_param(void *object,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
res = pw_impl_port_set_param(port, id, flags, param);
|
|
||||||
if (res < 0)
|
|
||||||
goto error_exit;
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
error_exit:
|
error_exit:
|
||||||
pw_log_error("port %p: set_param %d %p: %s", port, id, param, spa_strerror(res));
|
pw_log_error("port %p: set_param %d %p: %s", port, id, param, spa_strerror(res));
|
||||||
pw_proxy_errorf(proxy, res, "port_set_param: %s", spa_strerror(res));
|
pw_proxy_errorf(proxy, res, "port_set_param: %s", spa_strerror(res));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue