Stream autoconnect hangs if multiple source node only differ by format
I am trying to autoconnect a stream to one of multiple source nodes which only differ by their formats, but the stream never changes to the STREAMING or the ERROR state.
The reason is that the
find_node() function in
policy-node.c, which finds a matching node, does not check the format and returns any of the existing output nodes if the node has the correct direction and media. Later, when the link is negotiated, PipeWire fails to find a matching format for the ports and the link enters the ERROR state. Unfortunately, this error is not propagated to the stream, which remains in the PAUSED state.
I am able to work around the issue by finding the correct node in my application and passing the node id to
As I can pass the supported formats in
pw_stream_connect(), I would expect that PipeWire should be able to find the correct node by itself. At least, I would expect that the stream enters the ERROR state if the link negotiation fails.