fail if the channel map doesn't match the sample specs

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@810 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2006-04-26 16:50:36 +00:00
parent c27b1407f8
commit 9564cefdbf

View 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");