mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
deal with a possibly failing pa_channel_map_init_auto() correctly
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2105 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
a3e820fca7
commit
86b9ef8c96
13 changed files with 39 additions and 18 deletions
|
|
@ -164,6 +164,7 @@ static void resolver_cb(
|
|||
pa_module *m;
|
||||
|
||||
ss = u->core->default_sample_spec;
|
||||
pa_assert_se(pa_channel_map_init_auto(&cm, ss.channels, PA_CHANNEL_MAP_AUX));
|
||||
pa_channel_map_init_auto(&cm, ss.channels, PA_CHANNEL_MAP_DEFAULT);
|
||||
|
||||
for (l = txt; l; l = l->next) {
|
||||
|
|
@ -189,8 +190,10 @@ static void resolver_cb(
|
|||
avahi_free(value);
|
||||
}
|
||||
|
||||
if (!channel_map_set && cm.channels != ss.channels)
|
||||
if (!channel_map_set && cm.channels != ss.channels) {
|
||||
pa_assert_se(pa_channel_map_init_auto(&cm, ss.channels, PA_CHANNEL_MAP_AUX));
|
||||
pa_channel_map_init_auto(&cm, ss.channels, PA_CHANNEL_MAP_DEFAULT);
|
||||
}
|
||||
|
||||
if (!pa_sample_spec_valid(&ss)) {
|
||||
pa_log("Service '%s' contains an invalid sample specification.", name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue