summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sink-input.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/sink-input.c
parentb6deb0cc4c169b5ef9450586fc66b0b823ef249c (diff)
maintain a list of sink inputs/source outputs as part of the pa_client object
Diffstat (limited to 'src/pulsecore/sink-input.c')
-rw-r--r--src/pulsecore/sink-input.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index f5a1cb80..185350fa 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -283,6 +283,9 @@ pa_sink_input* pa_sink_input_new(
pa_assert_se(pa_idxset_put(core->sink_inputs, pa_sink_input_ref(i), &i->index) == 0);
pa_assert_se(pa_idxset_put(i->sink->inputs, i, NULL) == 0);
+ if (i->client)
+ pa_assert_se(pa_idxset_put(i->client->sink_inputs, i, NULL) >= 0);
+
pa_log_info("Created input %u \"%s\" on %s with sample spec %s and channel map %s",
i->index,
pa_strnull(pa_proplist_gets(i->proplist, PA_PROP_MEDIA_NAME)),
@@ -372,6 +375,9 @@ void pa_sink_input_unlink(pa_sink_input *i) {
if (pa_idxset_remove_by_data(i->sink->inputs, i, NULL))
pa_sink_input_unref(i);
+ if (i->client)
+ pa_idxset_remove_by_data(i->client->sink_inputs, i, NULL);
+
while ((o = pa_idxset_first(i->direct_outputs, NULL))) {
pa_assert(o != p);
pa_source_output_kill(o);