From d56f3751fe234162ee71c573fd4be9086af35ea4 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 3 Oct 2008 17:14:02 +0200 Subject: treat a channel map only then as compatible with a sample spec if it is valid --- src/pulse/channelmap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c index db6577ed..fd313bd3 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; } -- cgit