mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
format: make helper function to parse media type
This commit is contained in:
parent
5976beb149
commit
80de83f38a
24 changed files with 127 additions and 100 deletions
|
|
@ -522,9 +522,8 @@ static int port_set_format(struct spa_node *node,
|
|||
} else {
|
||||
struct spa_audio_info info = { 0 };
|
||||
|
||||
spa_pod_object_parse(format,
|
||||
"I", &info.media_type,
|
||||
"I", &info.media_subtype);
|
||||
if ((res = spa_format_parse(format, &info.media_type, &info.media_subtype)) < 0)
|
||||
return res;
|
||||
|
||||
if (info.media_type != SPA_MEDIA_TYPE_audio ||
|
||||
info.media_subtype != SPA_MEDIA_SUBTYPE_raw)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue