mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
teach module-rescue-streams and module-always-sink to not do anything if we are shutting down anyway
This commit is contained in:
parent
a3162a396e
commit
967c17a190
2 changed files with 17 additions and 1 deletions
|
|
@ -54,6 +54,10 @@ static pa_hook_result_t sink_hook_callback(pa_core *c, pa_sink *sink, void* user
|
|||
pa_assert(c);
|
||||
pa_assert(sink);
|
||||
|
||||
/* There's no point in doing anything if the core is shut down anyway */
|
||||
if (c->state == PA_CORE_SHUTDOWN)
|
||||
return PA_HOOK_OK;
|
||||
|
||||
if (!pa_idxset_size(sink->inputs)) {
|
||||
pa_log_debug("No sink inputs to move away.");
|
||||
return PA_HOOK_OK;
|
||||
|
|
@ -92,6 +96,10 @@ static pa_hook_result_t source_hook_callback(pa_core *c, pa_source *source, void
|
|||
pa_assert(c);
|
||||
pa_assert(source);
|
||||
|
||||
/* There's no point in doing anything if the core is shut down anyway */
|
||||
if (c->state == PA_CORE_SHUTDOWN)
|
||||
return PA_HOOK_OK;
|
||||
|
||||
if (!pa_idxset_size(source->outputs)) {
|
||||
pa_log_debug("No source outputs to move away.");
|
||||
return PA_HOOK_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue