summaryrefslogtreecommitdiffstats
path: root/src/sink.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-06-14 20:30:50 +0000
committerLennart Poettering <lennart@poettering.net>2004-06-14 20:30:50 +0000
commit5ce204829fe6706a5edaec50769abf7eed266656 (patch)
treeda0930ee55ce9e99ecd8be799395221e112d2e3b /src/sink.c
parentc8cf0c1ce9cf1b38b302ae4a2a6fa798fef85f08 (diff)
more cleanups
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@11 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/sink.c')
-rw-r--r--src/sink.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sink.c b/src/sink.c
index 02ca3468..dfe1bcb9 100644
--- a/src/sink.c
+++ b/src/sink.c
@@ -40,11 +40,14 @@ struct sink* sink_new(struct core *core, const char *name, const struct sample_s
}
void sink_free(struct sink *s) {
- struct input_stream *i;
+ struct input_stream *i, *j = NULL;
assert(s);
- while ((i = idxset_rrobin(s->input_streams, NULL)))
- input_stream_free(i);
+ while ((i = idxset_first(s->input_streams, NULL))) {
+ assert(i != j);
+ input_stream_kill(i);
+ j = i;
+ }
idxset_free(s->input_streams, NULL, NULL);
idxset_remove_by_data(s->core->sinks, s, NULL);