Merge branch 'fix-spa-choice-get-vals' into 'master'

Fix handling of unusual choice POD

See merge request pipewire/pipewire!2485
This commit is contained in:
Demi Marie Obenour 2025-10-27 13:40:36 -04:00
commit 501bfefa5e
12 changed files with 121 additions and 36 deletions

View file

@ -435,10 +435,14 @@ spa_pod_parser_get_object(&p,
\endcode
`spa_pod_get_values()` is a useful function. It returns a
`struct spa_pod*` with and array of values. For normal POD's
and choice none values, it simply returns the POD and one value.
For other choice values it returns the choice type and an array
of values:
`struct spa_pod*` with and array of values. For invalid PODs
it returns the POD and no values. For normal PODs it returns
the POD and one value. For choice values it returns the choice
type and an array of values. If the choice doesn't fit even a
single value, the array will have no values. If the choice is
of the `SPA_CHOICE_None` or the length of each element is
misaligned, the array will have one value. Otherwise,
the array will have the same length as the choice.
\code{.c}
struct spa_pod *value;