format: make helper function to parse media type

This commit is contained in:
Wim Taymans 2018-08-29 14:50:58 +02:00
parent 5976beb149
commit 80de83f38a
24 changed files with 127 additions and 100 deletions

View file

@ -892,9 +892,8 @@ static void client_node_initialized(void *data)
return;
}
spa_pod_object_parse(format,
"I", &media_type,
"I", &media_subtype);
if (spa_format_parse(format, &media_type, &media_subtype) < 0)
return;
pw_log_debug("client-stream %p: %s/%s", &impl->this,
spa_debug_type_find_name(spa_debug_types, media_type),