diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-10-04 14:06:26 +0530 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-10-08 15:17:15 +0530 |
commit | c055c55fbc5e7ced38c579424168a7843e659042 (patch) | |
tree | a67adcc15b9cd9270606e9837f938601ef0939fa | |
parent | 867170afa78198d265bfb587128921134daf3756 (diff) |
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.
-rw-r--r-- | src/modules/echo-cancel/module-echo-cancel.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c index 6c7828f4..89638b73 100644 --- a/src/modules/echo-cancel/module-echo-cancel.c +++ b/src/modules/echo-cancel/module-echo-cancel.c @@ -1357,6 +1357,11 @@ int pa__init(pa_module*m) { } 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.rate = DEFAULT_RATE; source_ss.channels = DEFAULT_CHANNELS; |