mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
core: memory leak, fix ref counting when moving streams
This commit is contained in:
parent
dcd4a73df9
commit
9ae8ca2c37
4 changed files with 40 additions and 12 deletions
|
|
@ -515,8 +515,12 @@ pa_queue *pa_sink_move_all_start(pa_sink *s) {
|
|||
for (i = PA_SINK_INPUT(pa_idxset_first(s->inputs, &idx)); i; i = n) {
|
||||
n = PA_SINK_INPUT(pa_idxset_next(s->inputs, &idx));
|
||||
|
||||
pa_sink_input_ref(i);
|
||||
|
||||
if (pa_sink_input_start_move(i) >= 0)
|
||||
pa_queue_push(q, pa_sink_input_ref(i));
|
||||
pa_queue_push(q, i);
|
||||
else
|
||||
pa_sink_input_unref(i);
|
||||
}
|
||||
|
||||
return q;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue