spa-pod: fix parser to be able to collect IDs as strings ('K')
This commit is contained in:
@@ -2708,6 +2708,13 @@ wp_spa_pod_parser_get (WpSpaPodParser *self, ...)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline gboolean
|
||||||
|
wp_spa_pod_parser_can_collect (const struct spa_pod *pod, char format)
|
||||||
|
{
|
||||||
|
format = (format == 'K') ? 'I' : format;
|
||||||
|
return spa_pod_parser_can_collect (pod, format);
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This is the `va_list` version of wp_spa_pod_parser_get()
|
* \brief This is the `va_list` version of wp_spa_pod_parser_get()
|
||||||
*
|
*
|
||||||
@@ -2758,7 +2765,7 @@ wp_spa_pod_parser_get_valist (WpSpaPodParser *self, va_list args)
|
|||||||
if ((optional = (*format == '?')))
|
if ((optional = (*format == '?')))
|
||||||
format++;
|
format++;
|
||||||
|
|
||||||
if (!pod || !spa_pod_parser_can_collect (pod, *format)) {
|
if (!pod || !wp_spa_pod_parser_can_collect (pod, *format)) {
|
||||||
if (!optional)
|
if (!optional)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user