summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/source-output.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-01-15 18:38:20 +0100
committerLennart Poettering <lennart@poettering.net>2009-01-15 18:38:20 +0100
commit344c934edbd780e1efe9ac413402ee6d70fe29e3 (patch)
tree900bc4b3ca7621ffae2466ac56354f7c02aae02c /src/pulsecore/source-output.c
parentb6deb0cc4c169b5ef9450586fc66b0b823ef249c (diff)
maintain a list of sink inputs/source outputs as part of the pa_client object
Diffstat (limited to 'src/pulsecore/source-output.c')
-rw-r--r--src/pulsecore/source-output.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index e3d0d8b2..b1c65d1c 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -223,6 +223,9 @@ pa_source_output* pa_source_output_new(
pa_assert_se(pa_idxset_put(core->source_outputs, o, &o->index) == 0);
pa_assert_se(pa_idxset_put(o->source->outputs, pa_source_output_ref(o), NULL) == 0);
+ if (o->client)
+ pa_assert_se(pa_idxset_put(o->client->source_outputs, o, NULL) >= 0);
+
if (o->direct_on_input)
pa_assert_se(pa_idxset_put(o->direct_on_input->direct_outputs, o, NULL) == 0);
@@ -290,6 +293,9 @@ void pa_source_output_unlink(pa_source_output*o) {
if (pa_idxset_remove_by_data(o->source->outputs, o, NULL))
pa_source_output_unref(o);
+ if (o->client)
+ pa_idxset_remove_by_data(o->client->source_outputs, o, NULL);
+
update_n_corked(o, PA_SOURCE_OUTPUT_UNLINKED);
o->state = PA_SOURCE_OUTPUT_UNLINKED;