mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
policy-node: only set peer when we actually linked something
This commit is contained in:
parent
cb3f1b51aa
commit
a0777d7806
2 changed files with 5 additions and 4 deletions
|
|
@ -466,8 +466,6 @@ static int link_nodes(struct node *node, struct node *peer)
|
|||
#endif
|
||||
}
|
||||
|
||||
node->peer = peer;
|
||||
|
||||
if (node->direction == PW_DIRECTION_INPUT) {
|
||||
output = peer;
|
||||
input = node;
|
||||
|
|
@ -480,7 +478,8 @@ static int link_nodes(struct node *node, struct node *peer)
|
|||
pw_properties_setf(props, PW_KEY_LINK_INPUT_NODE, "%d", input->id);
|
||||
pw_log_info("linking node %d to node %d", output->id, input->id);
|
||||
|
||||
sm_media_session_create_links(impl->session, &props->dict);
|
||||
if (sm_media_session_create_links(impl->session, &props->dict) > 0)
|
||||
node->peer = peer;
|
||||
|
||||
pw_properties_free(props);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue