mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
pulse-server: use EnumFormat as fallback
Use a fixated format and position from EnumFormat as a fallback.
This commit is contained in:
parent
124b1221a6
commit
66cf4e68d5
3 changed files with 61 additions and 17 deletions
|
|
@ -326,18 +326,19 @@ static int format_parse_param(const struct spa_pod *param, struct sample_spec *s
|
|||
!SPA_AUDIO_FORMAT_IS_INTERLEAVED(info.info.raw.format)) {
|
||||
return -ENOTSUP;
|
||||
}
|
||||
if (ss) {
|
||||
ss->format = format_id2pa(info.info.raw.format);
|
||||
if (ss->format == SAMPLE_INVALID)
|
||||
return -ENOTSUP;
|
||||
|
||||
ss->format = format_id2pa(info.info.raw.format);
|
||||
if (ss->format == SAMPLE_INVALID)
|
||||
return -ENOTSUP;
|
||||
|
||||
ss->rate = info.info.raw.rate;
|
||||
ss->channels = info.info.raw.channels;
|
||||
|
||||
map->channels = info.info.raw.channels;
|
||||
for (i = 0; i < map->channels; i++)
|
||||
map->map[i] = channel_id2pa(info.info.raw.position[i], &aux);
|
||||
|
||||
ss->rate = info.info.raw.rate;
|
||||
ss->channels = info.info.raw.channels;
|
||||
}
|
||||
if (map) {
|
||||
map->channels = info.info.raw.channels;
|
||||
for (i = 0; i < map->channels; i++)
|
||||
map->map[i] = channel_id2pa(info.info.raw.position[i], &aux);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue