From: Lennart Poettering Date: Fri, 3 Oct 2008 15:14:02 +0000 (+0200) Subject: treat a channel map only then as compatible with a sample spec if it is valid X-Git-Tag: submit/2.0-panda/20130828.192557~2622 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d56f3751fe234162ee71c573fd4be9086af35ea4;p=profile%2Fivi%2Fpulseaudio-panda.git treat a channel map only then as compatible with a sample spec if it is valid --- diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c index db6577e..fd313bd 100644 --- a/src/pulse/channelmap.c +++ b/src/pulse/channelmap.c @@ -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; }