mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
suspend-on-idle: Fix monitor source handling
Fixes a crash that happened due to calling pa_source_check_suspend() when d->source was NULL.
This commit is contained in:
parent
2780f4c24f
commit
0a5adc95c4
1 changed files with 9 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue