[polypaudio-commits] r786 - /trunk/src/polyp/stream.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sun Apr 23 13:58:09 PDT 2006


Author: lennart
Date: Sun Apr 23 22:58:08 2006
New Revision: 786

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=786&root=polypaudio&view=rev
Log:
* 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

Modified:
    trunk/src/polyp/stream.c

Modified: trunk/src/polyp/stream.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polyp/stream.c?rev=786&root=polypaudio&r1=785&r2=786&view=diff
==============================================================================
--- trunk/src/polyp/stream.c (original)
+++ trunk/src/polyp/stream.c Sun Apr 23 22:58:08 2006
@@ -195,9 +195,6 @@
 
         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 @@
     pa_stream *s = userdata;
     
     assert(pd);
-    assert(t);
     assert(s);
     assert(s->state == PA_STREAM_CREATING);
         
@@ -412,9 +408,6 @@
 
     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);
     




More information about the pulseaudio-commits mailing list