mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-12 05:34:05 -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);
|
||||
|
||||
if (user_data.cache) {
|
||||
pw_param_update(&impl->param_list, &impl->pending_list, 0, NULL);
|
||||
pi->user = 1;
|
||||
if (SPA_RESULT_IS_OK(res) && !SPA_RESULT_IS_ASYNC(res)) {
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -1740,8 +1740,13 @@ int pw_impl_port_for_each_param(struct pw_impl_port *port,
|
|||
spa_hook_remove(&listener);
|
||||
|
||||
if (user_data.cache) {
|
||||
pw_param_update(&impl->param_list, &impl->pending_list, 0, NULL);
|
||||
pi->user = 1;
|
||||
if (SPA_RESULT_IS_OK(res) && !SPA_RESULT_IS_ASYNC(res)) {
|
||||
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