mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pod: require at least 1 choice value in _can_collect()
We can't collect the choice value when there is none so check for the number of choice values in _can_collect() as well.
This commit is contained in:
parent
e6e36c4d34
commit
36f288f884
1 changed files with 2 additions and 0 deletions
|
|
@ -286,6 +286,8 @@ SPA_API_POD_PARSER bool spa_pod_parser_can_collect(const struct spa_pod *pod, ch
|
|||
return true;
|
||||
if (SPA_POD_CHOICE_TYPE(pod) != SPA_CHOICE_None)
|
||||
return false;
|
||||
if (SPA_POD_CHOICE_N_VALUES(pod) < 1)
|
||||
return false;
|
||||
pod = SPA_POD_CHOICE_CHILD(pod);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue