mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
adapter: improve format parsing some more
This commit is contained in:
parent
c5a7f30a68
commit
9fb14be4e3
2 changed files with 10 additions and 10 deletions
|
|
@ -761,12 +761,15 @@ static int impl_node_set_param(void *object, uint32_t id, uint32_t flags,
|
|||
struct spa_audio_info info;
|
||||
|
||||
spa_zero(info);
|
||||
if (spa_format_audio_parse(format, &info) >= 0) {
|
||||
if (info.media_subtype != SPA_MEDIA_SUBTYPE_raw)
|
||||
return -ENOTSUP;
|
||||
if ((res = spa_format_audio_parse(format, &info)) < 0)
|
||||
return res;
|
||||
|
||||
if (info.media_subtype == SPA_MEDIA_SUBTYPE_raw)
|
||||
info.info.raw.rate = 0;
|
||||
this->default_format = info;
|
||||
}
|
||||
else
|
||||
return -ENOTSUP;
|
||||
|
||||
this->default_format = info;
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue