mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
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
This commit is contained in:
parent
e083357b88
commit
59d264ac56
2 changed files with 8 additions and 4 deletions
|
|
@ -920,9 +920,11 @@ void pa_sink_move_all_finish(pa_sink *s, pa_queue *q, bool save) {
|
|||
pa_assert(q);
|
||||
|
||||
while ((i = PA_SINK_INPUT(pa_queue_pop(q)))) {
|
||||
if (pa_sink_input_finish_move(i, s, save) < 0)
|
||||
pa_sink_input_fail_move(i);
|
||||
if (PA_SINK_INPUT_IS_LINKED(i->state)) {
|
||||
if (pa_sink_input_finish_move(i, s, save) < 0)
|
||||
pa_sink_input_fail_move(i);
|
||||
|
||||
}
|
||||
pa_sink_input_unref(i);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue