summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2011-08-31 14:37:05 +0200
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-08-31 18:49:44 +0530
commitc7bba2464d4acd6e400703346d6f0813b83214bf (patch)
tree4b60884b4c58f0fc439e8e8f01775665c9c4dd07
parentfb107fc77056b6bfcc7902d3ee048c271c212145 (diff)
module-switch-on-connect: Don't switch unlinked sink input and source outputs
Unlinked streams can not be moved, so don't try. BugLink: http://bugs.launchpad.net/bugs/837386 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
-rw-r--r--src/modules/module-switch-on-connect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/module-switch-on-connect.c b/src/modules/module-switch-on-connect.c
index 86eadd78..efe1270b 100644
--- a/src/modules/module-switch-on-connect.c
+++ b/src/modules/module-switch-on-connect.c
@@ -87,7 +87,7 @@ static pa_hook_result_t sink_put_hook_callback(pa_core *c, pa_sink *sink, void*
}
PA_IDXSET_FOREACH(i, def->inputs, idx) {
- if (i->save_sink)
+ if (i->save_sink || !PA_SINK_INPUT_IS_LINKED(i->state))
continue;
if (pa_sink_input_move_to(i, sink, FALSE) < 0)
@@ -140,7 +140,7 @@ static pa_hook_result_t source_put_hook_callback(pa_core *c, pa_source *source,
}
PA_IDXSET_FOREACH(o, def->outputs, idx) {
- if (o->save_source)
+ if (o->save_source || !PA_SOURCE_OUTPUT_IS_LINKED(o->state))
continue;
if (pa_source_output_move_to(o, source, FALSE) < 0)