pa_module *module;
pa_bool_t autoloaded;
+ pa_bool_t dead;
pa_bool_t save_aec;
pa_echo_canceller *ec;
pa_assert_ctl_context();
pa_assert_se(u = o->userdata);
+ u->dead = TRUE;
+
/* The order here matters! We first kill the source output, followed
* by the source. That means the source callbacks must be protected
* against an unconnected source output! */
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
+ u->dead = TRUE;
+
/* The order here matters! We first kill the sink input, followed
* by the sink. That means the sink callbacks must be protected
* against an unconnected sink input! */
pa_assert_ctl_context();
pa_assert_se(u = o->userdata);
+ if (u->dead)
+ return FALSE;
+
return (u->source != dest) && (u->sink != dest->monitor_of);
}
pa_sink_input_assert_ref(i);
pa_assert_se(u = i->userdata);
+ if (u->dead)
+ return FALSE;
+
return u->sink != dest;
}
u->core = m->core;
u->module = m;
m->userdata = u;
+ u->dead = FALSE;
u->ec = pa_xnew0(pa_echo_canceller, 1);
if (!u->ec) {
if (!(u = m->userdata))
return;
+ u->dead = TRUE;
+
/* See comments in source_output_kill_cb() above regarding
* destruction order! */