diff options
Diffstat (limited to 'src/pulsecore')
-rw-r--r-- | src/pulsecore/sink-input.c | 10 | ||||
-rw-r--r-- | src/pulsecore/source-output.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index 0dda204c..c248cd87 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -697,11 +697,6 @@ void pa_sink_input_unlink(pa_sink_input *i) { reset_callbacks(i); - if (linked) { - pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_REMOVE, i->index); - pa_hook_fire(&i->core->hooks[PA_CORE_HOOK_SINK_INPUT_UNLINK_POST], i); - } - if (i->sink) { if (PA_SINK_IS_LINKED(pa_sink_get_state(i->sink))) pa_sink_update_status(i->sink); @@ -709,6 +704,11 @@ void pa_sink_input_unlink(pa_sink_input *i) { i->sink = NULL; } + if (linked) { + pa_subscription_post(i->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_REMOVE, i->index); + pa_hook_fire(&i->core->hooks[PA_CORE_HOOK_SINK_INPUT_UNLINK_POST], i); + } + pa_core_maybe_vacuum(i->core); pa_sink_input_unref(i); diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c index 35ef1c54..3c421ad1 100644 --- a/src/pulsecore/source-output.c +++ b/src/pulsecore/source-output.c @@ -591,11 +591,6 @@ void pa_source_output_unlink(pa_source_output*o) { reset_callbacks(o); - if (linked) { - pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_REMOVE, o->index); - pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_UNLINK_POST], o); - } - if (o->source) { if (PA_SOURCE_IS_LINKED(pa_source_get_state(o->source))) pa_source_update_status(o->source); @@ -603,6 +598,11 @@ void pa_source_output_unlink(pa_source_output*o) { o->source = NULL; } + if (linked) { + pa_subscription_post(o->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_REMOVE, o->index); + pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_UNLINK_POST], o); + } + pa_core_maybe_vacuum(o->core); pa_source_output_unref(o); |