mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
* 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
This commit is contained in:
parent
193fb12228
commit
cdba0527a8
1 changed files with 0 additions and 7 deletions
|
|
@ -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 &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue