[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.13-141-g82f09b6
Lennart Poettering
gitmailer-noreply at 0pointer.de
Wed Dec 17 12:03:55 PST 2008
This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.
The master branch has been updated
from cb6a91973017160e9b10a8f86d831cbcf13bf53e (commit)
- Log -----------------------------------------------------------------
82f09b6... Don't hit an assert when checking for idleness
-----------------------------------------------------------------------
Summary of changes:
src/pulsecore/sink-input.c | 8 ++++++--
src/pulsecore/sink.c | 4 +++-
src/pulsecore/source-output.c | 7 ++++++-
src/pulsecore/source.c | 4 +++-
4 files changed, 18 insertions(+), 5 deletions(-)
-----------------------------------------------------------------------
commit 82f09b6d8ffcb51d3fdc7834762f45d887d44e70
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Dec 17 21:03:17 2008 +0100
Don't hit an assert when checking for idleness
Closes #398
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 0e1224f..d4e0a9c 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 */
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index a6027e7..1580cf2 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1022,7 +1022,9 @@ unsigned pa_sink_check_suspend(pa_sink *s) {
uint32_t idx;
pa_sink_assert_ref(s);
- pa_assert(PA_SINK_IS_LINKED(s->state));
+
+ if (!PA_SINK_IS_LINKED(s->state))
+ return 0;
ret = 0;
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 376402f..c92c5ab 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -247,7 +247,6 @@ static void update_n_corked(pa_source_output *o, pa_source_output_state_t state)
else if (o->state != PA_SOURCE_OUTPUT_CORKED && state == PA_SOURCE_OUTPUT_CORKED)
o->source->n_corked++;
- pa_source_update_status(o->source);
}
/* Called from main context */
@@ -265,6 +264,8 @@ static int source_output_set_state(pa_source_output *o, pa_source_output_state_t
if (state != PA_SOURCE_OUTPUT_UNLINKED)
pa_hook_fire(&o->source->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_STATE_CHANGED], o);
+ pa_source_update_status(o->source);
+
return 0;
}
@@ -303,6 +304,8 @@ void pa_source_output_unlink(pa_source_output*o) {
pa_hook_fire(&o->source->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_UNLINK_POST], o);
}
+ pa_source_update_status(o->source);
+
o->source = NULL;
pa_source_output_unref(o);
}
@@ -354,6 +357,8 @@ void pa_source_output_put(pa_source_output *o) {
pa_subscription_post(o->source->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_NEW, o->index);
pa_hook_fire(&o->source->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_PUT], o);
+
+ pa_source_update_status(o->source);
}
/* Called from main context */
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c
index 7d927fa..f113e29 100644
--- a/src/pulsecore/source.c
+++ b/src/pulsecore/source.c
@@ -652,7 +652,9 @@ unsigned pa_source_check_suspend(pa_source *s) {
uint32_t idx;
pa_source_assert_ref(s);
- pa_assert(PA_SOURCE_IS_LINKED(s->state));
+
+ if (!PA_SOURCE_IS_LINKED(s->state))
+ return 0;
ret = 0;
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list