summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sink.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-09-24 16:24:23 +0000
committerLennart Poettering <lennart@poettering.net>2007-09-24 16:24:23 +0000
commit55651ec215b8359aaf3668cc37eb270847563cc3 (patch)
tree81a71911d5426a1d81c9a6ae6f0946ba204055a3 /src/pulsecore/sink.c
parentba322a49e1754eba11495da9a10e3e0dbbe89244 (diff)
don't count streams using the monitor source in pa_sink_used_by(), because this would disallow suspending a sink ehn an rtp stream is connected
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1895 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/sink.c')
-rw-r--r--src/pulsecore/sink.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index 830960a5..733a9d9e 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -775,8 +775,11 @@ unsigned pa_sink_linked_by(pa_sink *s) {
ret = pa_idxset_size(s->inputs);
+ /* We add in the number of streams connected to us here. Please
+ * not the asymmmetry to pa_sink_used_by()! */
+
if (s->monitor_source)
- ret += pa_source_used_by(s->monitor_source);
+ ret += pa_source_linked_by(s->monitor_source);
return ret;
}
@@ -788,13 +791,11 @@ unsigned pa_sink_used_by(pa_sink *s) {
pa_assert(PA_SINK_LINKED(s->state));
ret = pa_idxset_size(s->inputs);
-
pa_assert(ret >= s->n_corked);
-
ret -= s->n_corked;
- if (s->monitor_source)
- ret += pa_source_used_by(s->monitor_source);
+ /* Streams connected to our monitor source do not matter for
+ * pa_sink_used_by()!.*/
return ret;
}