On Tue, 2017-05-09 at 16:59 +0200, Georg Chini wrote: > On 07.05.2017 13:23, Tanu Kaskinen wrote: > > On Sun, 2017-05-07 at 12:37 +0200, Georg Chini wrote: > > > Another similar point, while reading the code of > > > module-switch-on-connect, i > > > found a possible issue: > > > When a new sink turns up, pa_core_update_default_sink() is called from > > > sink_put(). After that, PA_CORE_HOOK_SINK_PUT is fired. Within the hook > > > in module switch-on-connect, it is checked, if the new sink is the default > > > sink. If yes, the hook does nothing. Doesn't that mean that if the new > > > sink has highest priority (and no user default is set), the streams will > > > not be moved away from the old default sink, because the old default > > > is lost when pa_core_update_default_sink() is called before the hook? > > > > Yes, that seems to be a real problem. I think we can just move the > > update_default_sink() call happen after the hook, and add a comment > > about why the order is important. > > > > Will you send a patch for this? Or should I? If you could, that would be great. -- Tanu https://www.patreon.com/tanuk