mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
stream: assume default channels when invalid
This commit is contained in:
parent
d41cde1bb8
commit
6df567e6d4
1 changed files with 3 additions and 0 deletions
|
|
@ -387,6 +387,9 @@ static void stream_format_changed(void *data, const struct spa_pod *format)
|
||||||
for (i = 0; i < info.info.raw.channels; i++)
|
for (i = 0; i < info.info.raw.channels; i++)
|
||||||
s->channel_map.map[i] = channel_id2pa(s, info.info.raw.position[i]);
|
s->channel_map.map[i] = channel_id2pa(s, info.info.raw.position[i]);
|
||||||
|
|
||||||
|
if (!pa_channel_map_valid(&s->channel_map))
|
||||||
|
pa_channel_map_init_auto(&s->channel_map, info.info.raw.channels, PA_CHANNEL_MAP_DEFAULT);
|
||||||
|
|
||||||
if (s->format)
|
if (s->format)
|
||||||
pa_format_info_free(s->format);
|
pa_format_info_free(s->format);
|
||||||
s->format = pa_format_info_from_sample_spec(&s->sample_spec, &s->channel_map);
|
s->format = pa_format_info_from_sample_spec(&s->sample_spec, &s->channel_map);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue