pod: descend in array type if possible

This commit is contained in:
Wim Taymans 2020-12-14 16:18:57 +01:00
parent 7c5cb5a281
commit 3ac2bc0ad2
2 changed files with 2 additions and 0 deletions

View file

@ -99,6 +99,7 @@ spa_debug_pod_value(int indent, const struct spa_type_info *info,
spa_debug("%*s" "Array: child.size %d, child.type %s", indent, "",
b->child.size, ti ? ti->name : "unknown");
info = info && info->values ? info->values : info;
SPA_POD_ARRAY_BODY_FOREACH(b, size, p)
spa_debug_pod_value(indent + 2, info, b->child.type, p, b->child.size);
break;

View file

@ -338,6 +338,7 @@ static void put_pod_value(struct data *d, const struct spa_type_info *info,
{
struct spa_pod_array_body *b = (struct spa_pod_array_body *)body;
void *p;
info = info && info->values ? info->values: info;
put_begin(d, "[", FLAG_SIMPLE);
SPA_POD_ARRAY_BODY_FOREACH(b, size, p)
put_pod_value(d, info, b->child.type, p, b->child.size);