Skip to content
Commit e2d810a9 authored by Pauli Virtanen's avatar Pauli Virtanen
Browse files

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.
parent 780f2d64
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment