sink: Link monitor source before activating port 64/21964/1
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Fri, 9 May 2014 08:25:28 +0000 (11:25 +0300)
committerIsmo Puustinen <ismo.puustinen@intel.com>
Wed, 28 May 2014 09:40:04 +0000 (12:40 +0300)
The port activation hook callbacks may want to use the monitor source.

Change-Id: I5d5c51171a78162dacb3286983cb560001e79ba1
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
src/pulsecore/sink.c

index 695e471..191b560 100644 (file)
@@ -669,11 +669,11 @@ void pa_sink_put(pa_sink* s) {
     else
         pa_assert_se(sink_set_state(s, PA_SINK_IDLE) == 0);
 
+    pa_source_put(s->monitor_source);
+
     if (s->active_port)
         pa_device_port_active_changed(s->active_port, true);
 
-    pa_source_put(s->monitor_source);
-
     pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK | PA_SUBSCRIPTION_EVENT_NEW, s->index);
     pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SINK_PUT], s);
 }