[pulseaudio-discuss] [PATCH 4/4] equalizer: Handle underlying sink going away better when autoloaded
arun at accosted.net
arun at accosted.net
Tue Jun 9 00:08:46 PDT 2015
From: Arun Raghavan <git at arunraghavan.net>
Detailed description in fix for module-echo-cancel.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=90416
---
src/modules/module-equalizer-sink.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c
index 96a19b6..9c25f3f 100644
--- a/src/modules/module-equalizer-sink.c
+++ b/src/modules/module-equalizer-sink.c
@@ -1055,9 +1055,6 @@ static bool sink_input_may_move_to_cb(pa_sink_input *i, pa_sink *dest) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
- if (u->autoloaded)
- return false;
-
return u->sink != dest;
}
@@ -1068,6 +1065,12 @@ static void sink_input_moving_cb(pa_sink_input *i, pa_sink *dest) {
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
+ if (u->autoloaded) {
+ /* We were autoloaded, and don't support moving. Let's unload ourselves. */
+ pa_log_debug("Can't move autoloaded stream, unloading");
+ pa_module_unload_request(u->module, true);
+ }
+
if (dest) {
pa_sink_set_asyncmsgq(u->sink, dest->asyncmsgq);
pa_sink_update_flags(u->sink, PA_SINK_LATENCY|PA_SINK_DYNAMIC_LATENCY, dest->flags);
--
2.4.2
More information about the pulseaudio-discuss
mailing list