]> code.delx.au - pulseaudio/blobdiff - src/modules/module-combine.c
fail if the channel map doesn't match the sample specs
[pulseaudio] / src / modules / module-combine.c
index 543fffa4a2f7b83c1c24555f4ec93cfb8a4a6e9e..470104970311e8c6f165f667e8f09ebb9ad0e4e2 100644 (file)
@@ -367,6 +367,11 @@ int pa__init(pa_core *c, pa_module*m) {
         pa_log(__FILE__": invalid channel map.");
         goto fail;
     }
+
+    if (ss.channels != map.channels) {
+        pa_log(__FILE__": channel map and sample specification don't match.");
+        goto fail;
+    }
     
     if (!(u->sink = pa_sink_new(c, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, &map))) {
         pa_log(__FILE__": failed to create sink");