Commit fe436f90 authored by Georg Chini's avatar Georg Chini Committed by Tanu Kaskinen
Browse files

sink-input, source-output: Fix stream rescue if a move fails

Merge Requests [1] and [2] introduced a regression. Streams were no longer moved
to the default sink or source if a started move failed. This patch fixes the problem.

[1] pulseaudio/pulseaudio!209
[2] pulseaudio/pulseaudio!215

Fixes: pulseaudio/pulseaudio#794
parent cc21b75a
......@@ -1979,6 +1979,12 @@ void pa_sink_input_fail_move(pa_sink_input *i) {
if (pa_hook_fire(&i->core->hooks[PA_CORE_HOOK_SINK_INPUT_MOVE_FAIL], i) == PA_HOOK_STOP)
/* Can we move the sink input to the default sink? */
if (pa_sink_input_may_move_to(i, i->core->default_sink)) {
if (pa_sink_input_finish_move(i, i->core->default_sink, false) >= 0)
if (i->moving)
i->moving(i, NULL);
......@@ -1606,6 +1606,12 @@ void pa_source_output_fail_move(pa_source_output *o) {
if (pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_MOVE_FAIL], o) == PA_HOOK_STOP)
/* Can we move the source output to the default source? */
if (pa_source_output_may_move_to(o, o->core->default_source)) {
if (pa_source_output_finish_move(o, o->core->default_source, false) >= 0)
if (o->moving)
o->moving(o, NULL);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment