summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sink-input.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-12-17 21:03:17 +0100
committerLennart Poettering <lennart@poettering.net>2008-12-17 21:03:17 +0100
commit82f09b6d8ffcb51d3fdc7834762f45d887d44e70 (patch)
treee3449d50863c4394eb597f22a8f2784fe25c487a /src/pulsecore/sink-input.c
parentcb6a91973017160e9b10a8f86d831cbcf13bf53e (diff)
Don't hit an assert when checking for idleness
Closes #398
Diffstat (limited to 'src/pulsecore/sink-input.c')
-rw-r--r--src/pulsecore/sink-input.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 0e1224f1..d4e0a9c9 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -302,8 +302,6 @@ static void update_n_corked(pa_sink_input *i, pa_sink_input_state_t state) {
pa_assert_se(i->sink->n_corked -- >= 1);
else if (i->state != PA_SINK_INPUT_CORKED && state == PA_SINK_INPUT_CORKED)
i->sink->n_corked++;
-
- pa_sink_update_status(i->sink);
}
/* Called from main context */
@@ -341,6 +339,8 @@ static int sink_input_set_state(pa_sink_input *i, pa_sink_input_state_t state) {
pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_STATE_CHANGED], ssync);
}
+ pa_sink_update_status(i->sink);
+
return 0;
}
@@ -391,6 +391,8 @@ void pa_sink_input_unlink(pa_sink_input *i) {
pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_UNLINK_POST], i);
}
+ pa_sink_update_status(i->sink);
+
i->sink = NULL;
pa_sink_input_unref(i);
}
@@ -452,6 +454,8 @@ void pa_sink_input_put(pa_sink_input *i) {
pa_subscription_post(i->sink->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_NEW, i->index);
pa_hook_fire(&i->sink->core->hooks[PA_CORE_HOOK_SINK_INPUT_PUT], i);
+
+ pa_sink_update_status(i->sink);
}
/* Called from main context */