mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-05 07:15:34 -04:00
pipewire: impl-{node,port}: do not cache failed param enumerations
If the param enumeration fails, do not set `spa_param_info::user` to 1 indicating that the result is cached. Doing so can lead to the first (uncached) call failing, while the rest will succeed (with 0 params).
This commit is contained in:
parent
22a5fad902
commit
5e37d43881
2 changed files with 14 additions and 4 deletions
|
|
@ -2653,8 +2653,13 @@ int pw_impl_node_for_each_param(struct pw_impl_node *node,
|
||||||
spa_hook_remove(&listener);
|
spa_hook_remove(&listener);
|
||||||
|
|
||||||
if (user_data.cache) {
|
if (user_data.cache) {
|
||||||
pw_param_update(&impl->param_list, &impl->pending_list, 0, NULL);
|
if (SPA_RESULT_IS_OK(res) && !SPA_RESULT_IS_ASYNC(res)) {
|
||||||
pi->user = 1;
|
pw_param_update(&impl->param_list, &impl->pending_list, 0, NULL);
|
||||||
|
pi->user = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pw_param_clear(&impl->pending_list, SPA_ID_INVALID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
|
||||||
|
|
@ -1740,8 +1740,13 @@ int pw_impl_port_for_each_param(struct pw_impl_port *port,
|
||||||
spa_hook_remove(&listener);
|
spa_hook_remove(&listener);
|
||||||
|
|
||||||
if (user_data.cache) {
|
if (user_data.cache) {
|
||||||
pw_param_update(&impl->param_list, &impl->pending_list, 0, NULL);
|
if (SPA_RESULT_IS_OK(res) && !SPA_RESULT_IS_ASYNC(res)) {
|
||||||
pi->user = 1;
|
pw_param_update(&impl->param_list, &impl->pending_list, 0, NULL);
|
||||||
|
pi->user = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pw_param_clear(&impl->pending_list, SPA_ID_INVALID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue