mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-11 13:30:02 -05:00
sink-input: clear the preferred_sink if it is default_sink
When the user moves a stream to the current default sink, the preferred_sink should be set to NULL and module-stream-restore should clear the routing for that stream in the stream database. From that point on the stream will be always routed to the default sink. Signed-off-by: Hui Wang <hui.wang@canonical.com>
This commit is contained in:
parent
24d5d180b8
commit
bc0e728320
2 changed files with 15 additions and 8 deletions
|
|
@ -1930,8 +1930,12 @@ int pa_sink_input_finish_move(pa_sink_input *i, pa_sink *dest, bool save) {
|
|||
save the preferred_sink */
|
||||
if (save) {
|
||||
pa_xfree(i->preferred_sink);
|
||||
i->preferred_sink = pa_xstrdup(dest->name);
|
||||
if (dest == dest->core->default_sink)
|
||||
i->preferred_sink = NULL;
|
||||
else
|
||||
i->preferred_sink = pa_xstrdup(dest->name);
|
||||
}
|
||||
|
||||
pa_idxset_put(dest->inputs, pa_sink_input_ref(i), NULL);
|
||||
|
||||
PA_HASHMAP_FOREACH(v, i->volume_factor_sink_items, state)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue