From cdba0527a8b33874816da339d06133ec7bc85918 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 23 Apr 2006 20:58:08 +0000 Subject: [PATCH] * fix ref counting of pa_stream: strictly refcount from context to stream and never vice versa to make sure that we never loose memory * don't hit an assert() in case of a timeout events git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@786 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/polyp/stream.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/polyp/stream.c b/src/polyp/stream.c index e400415..f11ef49 100644 --- a/src/polyp/stream.c +++ b/src/polyp/stream.c @@ -195,9 +195,6 @@ void pa_stream_set_state(pa_stream *s, pa_stream_state_t st) { s->channel = 0; s->channel_valid = 0; - - /* We keep a ref as long as we're connected */ - pa_stream_unref(s); } if (s->state_callback) @@ -374,7 +371,6 @@ void pa_create_stream_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED pa_stream *s = userdata; assert(pd); - assert(t); assert(s); assert(s->state == PA_STREAM_CREATING); @@ -413,9 +409,6 @@ void pa_create_stream_callback(pa_pdispatch *pd, uint32_t command, PA_GCC_UNUSED s->channel_valid = 1; pa_dynarray_put((s->direction == PA_STREAM_RECORD) ? s->context->record_streams : s->context->playback_streams, s->channel, s); - /* We add an extra ref as long as we're connected (i.e. in the dynarray) */ - pa_stream_ref(s); - pa_stream_set_state(s, PA_STREAM_READY); if (s->direction != PA_STREAM_UPLOAD && -- 2.7.4