execute detach callback before we change the state to UNLINKED
authorLennart Poettering <lennart@poettering.net>
Sat, 21 Jun 2008 00:24:59 +0000 (02:24 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 21 Jun 2008 00:24:59 +0000 (02:24 +0200)
src/pulsecore/sink.c

index 77a0c56..edb023b 100644 (file)
@@ -1038,11 +1038,11 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse
              * sink input handling a few lines down at
              * PA_SINK_MESSAGE_PREPAPRE_MOVE, too. */
 
-            pa_sink_input_set_state_within_thread(i, i->state);
-
             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;