node.dont-reconnect streams handling not compatible with Pulse DONT_MOVE
Wireplumber policy-node destroys dont-move streams if the target sink changes. There's comment there that
-- if the stream has dont-reconnect and was already linked before,
-- don't link it to a new target
if not reconnect and si_flags[si.id].was_handled then
si_target = nil
end
but this leads to destroying the stream a few lines below since si_target is now nil:
if not si_target then
Log.info (si, "... target not found, reconnect:" .. tostring(reconnect))
local node = si:get_associated_proxy ("node")
if not reconnect then
Log.info (si, "... destroy node")
This is an issue for dont-reconnect streams that don't have defined target, or if they were moved via metadata. Or ones whose defined target does not exist for some reason (node really does not exist, or there is some race condition. the window for race conditions should be much reduced by !323 (merged), but at least ones involving metadata cannot be ruled out).
This differs from Pulseaudio DONT_MOVE, with which the streams simply don't move. pipewire-media-session also did not move already linked node.dont-reconnect streams.
The question now is whether node.dont-reconnect behavior in WP should be changed to match that. Or, if to add a separate flag, change Wireplumber to respect it, and make pipewire-pulse sets it.