mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
source-output: clear the preferred_source if it is default_source
When the user moves a stream to the current default source, the preferred_source 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 source. Signed-off-by: Hui Wang <hui.wang@canonical.com>
This commit is contained in:
parent
e529db75ec
commit
70bbbcdc84
2 changed files with 15 additions and 7 deletions
|
|
@ -1561,8 +1561,12 @@ int pa_source_output_finish_move(pa_source_output *o, pa_source *dest, bool save
|
|||
save the preferred_source */
|
||||
if (save) {
|
||||
pa_xfree(o->preferred_source);
|
||||
o->preferred_source = pa_xstrdup(dest->name);
|
||||
if (dest == dest->core->default_source)
|
||||
o->preferred_source = NULL;
|
||||
else
|
||||
o->preferred_source = pa_xstrdup(dest->name);
|
||||
}
|
||||
|
||||
pa_idxset_put(o->source->outputs, pa_source_output_ref(o), NULL);
|
||||
|
||||
pa_cvolume_remap(&o->volume_factor_source, &o->channel_map, &o->source->channel_map);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue