[pulseaudio-commits] r1542 - in /branches/lennart/src/pulsecore: sink-input.c source-output.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Jul 26 06:18:54 PDT 2007


Author: lennart
Date: Thu Jul 26 15:18:50 2007
New Revision: 1542

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1542&root=3Dpulseaudio&vi=
ew=3Drev
Log:
Increase ref counter of sink input as long as it is included in the sink id=
xset

Modified:
    branches/lennart/src/pulsecore/sink-input.c
    branches/lennart/src/pulsecore/source-output.c

Modified: branches/lennart/src/pulsecore/sink-input.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
sink-input.c?rev=3D1542&root=3Dpulseaudio&r1=3D1541&r2=3D1542&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/sink-input.c (original)
+++ branches/lennart/src/pulsecore/sink-input.c Thu Jul 26 15:18:50 2007
@@ -198,7 +198,7 @@
     i->thread_info.volume =3D i->volume;
     i->thread_info.muted =3D i->muted;
 =

-    pa_assert_se(pa_idxset_put(core->sink_inputs, i, &i->index) =3D=3D 0);
+    pa_assert_se(pa_idxset_put(core->sink_inputs, pa_sink_input_ref(i), &i=
->index) =3D=3D 0);
     pa_assert_se(pa_idxset_put(i->sink->inputs, i, NULL) =3D=3D 0);
 =

     pa_log_info("Created input %u \"%s\" on %s with sample spec %s",
@@ -235,6 +235,7 @@
     pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i->sink), PA_SINK_M=
ESSAGE_REMOVE_INPUT, i, NULL);
     pa_idxset_remove_by_data(i->sink->core->sink_inputs, i, NULL);
     pa_idxset_remove_by_data(i->sink->inputs, i, NULL);
+    pa_sink_input_unref(i);
 =

     pa_subscription_post(i->sink->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|P=
A_SUBSCRIPTION_EVENT_REMOVE, i->index);
 =


Modified: branches/lennart/src/pulsecore/source-output.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/=
source-output.c?rev=3D1542&root=3Dpulseaudio&r1=3D1541&r2=3D1542&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/pulsecore/source-output.c (original)
+++ branches/lennart/src/pulsecore/source-output.c Thu Jul 26 15:18:50 2007
@@ -157,7 +157,7 @@
     o->thread_info.resampler =3D resampler;
 =

     pa_assert_se(pa_idxset_put(core->source_outputs, o, &o->index) =3D=3D =
0);
-    pa_assert_se( pa_idxset_put(o->source->outputs, o, NULL) =3D=3D 0);
+    pa_assert_se(pa_idxset_put(o->source->outputs, pa_source_output_ref(o)=
, NULL) =3D=3D 0);
 =

     pa_log_info("Created output %u \"%s\" on %s with sample spec %s",
                 o->index,
@@ -191,6 +191,7 @@
 =

     pa_idxset_remove_by_data(o->source->core->source_outputs, o, NULL);
     pa_idxset_remove_by_data(o->source->outputs, o, NULL);
+    pa_source_output_unref(o);
 =

     pa_subscription_post(o->source->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUT=
PUT|PA_SUBSCRIPTION_EVENT_REMOVE, o->index);
 =





More information about the pulseaudio-commits mailing list