summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2007-09-19 21:20:15 +0000
committerLennart Poettering <lennart@poettering.net>2007-09-19 21:20:15 +0000
commita8a9ee499d400fd54d4f67340247f78fb4ab2a5c (patch)
treede2b3b475f941a576f541cf4c999129185f84f56
parent42b71ff9656904668d3abcf0016768701148301b (diff)
make sure we initialize thread private data before we move our ghost sink to the rt thread, not after
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1870 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/pulsecore/sink-input.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index b8ca5e1b..3993e337 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -774,6 +774,10 @@ int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest, int immediately) {
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 @@ int pa_sink_input_move_to(pa_sink_input *i, pa_sink *dest, int immediately) {
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);