treat a channel map only then as compatible with a sample spec if it is valid

This commit is contained in:
Lennart Poettering 2008-10-03 17:14:02 +02:00
parent 891989896d
commit d56f3751fe

View file

@ -569,5 +569,11 @@ int pa_channel_map_compatible(const pa_channel_map *map, const pa_sample_spec *s
pa_assert(map);
pa_assert(ss);
if (!pa_channel_map_valid(map))
return 0;
if (!pa_sample_spec_valid(ss))
return 0;
return map->channels == ss->channels;
}