]> code.delx.au - pulseaudio/commitdiff
echo-cancel: Fix source may_move_to function
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Thu, 2 Dec 2010 11:04:03 +0000 (16:34 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Thu, 2 Dec 2010 11:04:03 +0000 (16:34 +0530)
This is required to make sure that the source output between
module-echo-cancel and ALSA can't get plugged to the virtual source or
monitor of the virtual sink that we expose. This could be triggered by
changing the profile of the underlying ALSA device.

src/modules/echo-cancel/module-echo-cancel.c

index b6c82a5b4a40efe4d6cfdc0069332baa4dbe7017..611ebb7100130fed6c985d150bdff19e5977c957 100644 (file)
@@ -1212,7 +1212,7 @@ static pa_bool_t source_output_may_move_to_cb(pa_source_output *o, pa_source *de
     pa_assert_ctl_context();
     pa_assert_se(u = o->userdata);
 
-    return TRUE;
+    return (u->source != dest) && (u->sink != dest->monitor_of);
 }
 
 /* Called from main context */