media-session: fix linking nodes with targets to wrong nodes
For nodes that have node.target set, when the target is not available, media-session links them to any available node. If the target node appears afterward, media-session would not re-link them, leading to output being directed to wrong place (e.g. pavucontrol input monitor) even though the intended target or a better fallback is available. This occurs e.g. when devices are removed and re-added. Fix this by (i) for reconnectable nodes, reconnect them if target appears later, and (ii) for non-reconnectable nodes, raise error to the client if node.target is set but not found (but proceed to fallback if obj->target_node is set). Also slightly reorganize policy-node.c:rescan_node for clarity.
Loading
Please register or sign in to comment