echo-cancel: Fail if loaded between a sink and its monitor

Loading between a sink and its monitor causes a deadlock (while sending
messages for latency snapshots). It isn't a case that has any real
conceivable use, so let's just disallow it.
This commit is contained in:
Arun Raghavan 2011-10-04 14:06:26 +05:30
parent d086f15c91
commit e681469154

View file

@ -1357,6 +1357,11 @@ int pa__init(pa_module*m) {
} }
pa_assert(sink_master); pa_assert(sink_master);
if (source_master->monitor_of == sink_master) {
pa_log("Can't cancel echo between a sink and its monitor");
goto fail;
}
source_ss = source_master->sample_spec; source_ss = source_master->sample_spec;
source_ss.rate = DEFAULT_RATE; source_ss.rate = DEFAULT_RATE;
source_ss.channels = DEFAULT_CHANNELS; source_ss.channels = DEFAULT_CHANNELS;