sink, source: Don't finish move if unlink happens after pa_*_move_all_start()
authorGeorg Chini <georg@chini.tk>
Sun, 3 Dec 2017 21:29:09 +0000 (22:29 +0100)
committerGeorg Chini <georg@chini.tk>
Sun, 3 Dec 2017 21:29:09 +0000 (22:29 +0100)
commit59d264ac56d644f626251daa44ef7b39a9a9fe03
tree4f6cd0ee8514ba4adea2423d190e41243787cbf8
parente083357b88c6360edc3d8fe8bb1109c7f190709a
sink, source: Don't finish move if unlink happens after pa_*_move_all_start()

When a sink input was unlinked between the calls to pa_sink_move_all_start() and
pa_sink_move_all_finish(), pa_sink_move_all_finish() tried to finish the move
of the already unlinked sink input, which lead to an assertion in
pa_sink_input_finish_move(). The same applies for the source side.

This patch fixes the problem by checking the state of the sink input or
source output in pa_*_move_all_finish().

Bug report: https://bugs.freedesktop.org/show_bug.cgi?id=103752
src/pulsecore/sink.c
src/pulsecore/source.c