[pulseaudio-commits] src/modules
Tanu Kaskinen
tanuk at kemper.freedesktop.org
Mon Mar 3 06:33:44 PST 2014
src/modules/module-suspend-on-idle.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 0a5adc95c46b7140e004fdd993181237f99c51d5
Author: Tanu Kaskinen <tanu.kaskinen at linux.intel.com>
Date: Mon Mar 3 16:21:21 2014 +0200
suspend-on-idle: Fix monitor source handling
Fixes a crash that happened due to calling pa_source_check_suspend()
when d->source was NULL.
diff --git a/src/modules/module-suspend-on-idle.c b/src/modules/module-suspend-on-idle.c
index 959de43..15cbf95 100644
--- a/src/modules/module-suspend-on-idle.c
+++ b/src/modules/module-suspend-on-idle.c
@@ -167,8 +167,15 @@ static pa_hook_result_t source_output_fixate_hook_cb(pa_core *c, pa_source_outpu
if (d) {
resume(d);
- if (pa_source_check_suspend(d->source) <= 0)
- restart(d);
+ if (d->source) {
+ if (pa_source_check_suspend(d->source) <= 0)
+ restart(d);
+ } else {
+ /* The source output is connected to a monitor source. */
+ pa_assert(d->sink);
+ if (pa_sink_check_suspend(d->sink) <= 0)
+ restart(d);
+ }
}
return PA_HOOK_OK;
More information about the pulseaudio-commits
mailing list