summaryrefslogtreecommitdiffstats
path: root/src/pulse/channelmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse/channelmap.c')
-rw-r--r--src/pulse/channelmap.c6
1 files changed, 6 insertions, 0 deletions
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;
}