[pulseaudio-commits] r1870 - /branches/lennart/src/pulsecore/sink-input.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Wed Sep 19 14:20:16 PDT 2007


Author: lennart
Date: Wed Sep 19 23:20:15 2007
New Revision: 1870

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1870&root=pulseaudio&view=rev
Log:
make sure we initialize thread private data before we move our ghost sink to the rt thread, not after

Modified:
    branches/lennart/src/pulsecore/sink-input.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=1870&root=pulseaudio&r1=1869&r2=1870&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/sink-input.c (original)
+++ branches/lennart/src/pulsecore/sink-input.c Wed Sep 19 23:20:15 2007
@@ -774,6 +774,10 @@
                     NULL,
                     NULL);
 
+            info.ghost_sink_input->thread_info.state = info.ghost_sink_input->state = PA_SINK_INPUT_RUNNING;
+            info.ghost_sink_input->thread_info.volume = info.ghost_sink_input->volume;
+            info.ghost_sink_input->thread_info.muted = info.ghost_sink_input->muted;
+            
             info.buffer = pa_memblockq_new(0, MOVE_BUFFER_LENGTH, 0, pa_frame_size(&origin->sample_spec), 0, 0, NULL);
         }
     }
@@ -782,9 +786,6 @@
 
     if (info.ghost_sink_input) {
         /* Basically, do what pa_sink_input_put() does ...*/
-        info.ghost_sink_input->thread_info.state = info.ghost_sink_input->state = PA_SINK_INPUT_RUNNING;
-        info.ghost_sink_input->thread_info.volume = info.ghost_sink_input->volume;
-        info.ghost_sink_input->thread_info.muted = info.ghost_sink_input->muted;
         
         pa_subscription_post(i->sink->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_NEW, info.ghost_sink_input->index);
         pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_PUT], info.ghost_sink_input);




More information about the pulseaudio-commits mailing list