mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
parser: only recurse into CHOICE when 1 value
Only try to collect the CHOICE value when there is only 1 value. This makes it possible to parse the complete choice as a SPA_Pod.
This commit is contained in:
parent
6204c95ee3
commit
181c2de2ee
1 changed files with 2 additions and 1 deletions
|
|
@ -484,7 +484,8 @@ static inline int spa_pod_parser_getv(struct spa_pod_parser *parser, va_list arg
|
||||||
}
|
}
|
||||||
SPA_POD_PARSER_SKIP(*format, args);
|
SPA_POD_PARSER_SKIP(*format, args);
|
||||||
} else {
|
} else {
|
||||||
if (pod->type == SPA_TYPE_Choice && *format != 'V')
|
if (pod->type == SPA_TYPE_Choice && *format != 'V' &&
|
||||||
|
SPA_POD_CHOICE_TYPE(pod) == SPA_CHOICE_None)
|
||||||
pod = SPA_POD_CHOICE_CHILD(pod);
|
pod = SPA_POD_CHOICE_CHILD(pod);
|
||||||
|
|
||||||
SPA_POD_PARSER_COLLECT(pod, *format, args);
|
SPA_POD_PARSER_COLLECT(pod, *format, args);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue