* sink input handling a few lines down at
* PA_SINK_MESSAGE_START_MOVE, too. */
+ pa_assert(i->thread_info.attached);
+ i->thread_info.attached = false;
+
if (i->detach)
i->detach(i);
pa_sink_input_set_state_within_thread(i, i->state);
- pa_assert(i->thread_info.attached);
- i->thread_info.attached = false;
-
/* Since the caller sleeps in pa_sink_input_unlink(),
* we can safely access data outside of thread_info even
* though it is mutable */
}
}
- if (i->detach)
- i->detach(i);
-
pa_assert(i->thread_info.attached);
i->thread_info.attached = false;
+ if (i->detach)
+ i->detach(i);
+
/* Let's remove the sink input ...*/
pa_hashmap_remove_and_free(s->thread_info.inputs, PA_UINT32_TO_PTR(i->index));
pa_source_output_set_state_within_thread(o, o->state);
- if (o->detach)
- o->detach(o);
-
pa_assert(o->thread_info.attached);
o->thread_info.attached = false;
+ if (o->detach)
+ o->detach(o);
+
if (o->thread_info.direct_on_input) {
pa_hashmap_remove(o->thread_info.direct_on_input->thread_info.direct_outputs, PA_UINT32_TO_PTR(o->index));
o->thread_info.direct_on_input = NULL;