mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
modules: add various checks to avoid selecting objects that are not linked or in another unclear state
This commit is contained in:
parent
2a39663ab6
commit
4c29ba9c33
4 changed files with 92 additions and 16 deletions
|
|
@ -71,6 +71,9 @@ static pa_sink* find_evacuation_sink(pa_core *c, pa_sink_input *i, pa_sink *skip
|
|||
if (target == skip)
|
||||
continue;
|
||||
|
||||
if (!PA_SINK_IS_LINKED(pa_sink_get_state(target)))
|
||||
continue;
|
||||
|
||||
if (pa_sink_input_may_move_to(i, target))
|
||||
return target;
|
||||
}
|
||||
|
|
@ -159,6 +162,9 @@ static pa_source* find_evacuation_source(pa_core *c, pa_source_output *o, pa_sou
|
|||
if (!target->monitor_of != !skip->monitor_of)
|
||||
continue;
|
||||
|
||||
if (!PA_SOURCE_IS_LINKED(pa_source_get_state(target)))
|
||||
continue;
|
||||
|
||||
if (pa_source_output_may_move_to(o, target))
|
||||
return target;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue