debug: allow custom type root

This commit is contained in:
Wim Taymans 2018-08-30 12:01:52 +02:00
parent 05d3502c84
commit 7cdb980b1a
32 changed files with 102 additions and 83 deletions

View file

@ -122,6 +122,9 @@ static inline int spa_debug_format(int indent,
[SPA_TYPE_Pod] = "pod"
};
if (info == NULL)
info = spa_type_format;
if (format == NULL || SPA_POD_TYPE(format) != SPA_TYPE_Object)
return -EINVAL;
@ -135,8 +138,6 @@ static inline int spa_debug_format(int indent,
media_type ? rindex(media_type, ':') + 1 : "unknown",
media_subtype ? rindex(media_subtype, ':') + 1 : "unknown");
info = spa_type_format;
SPA_POD_OBJECT_FOREACH((struct spa_pod_object*)format, pod) {
struct spa_pod_prop *prop;
const char *key;