diff --git a/src/examples/media-session/media-session.c b/src/examples/media-session/media-session.c index 03aa41dcd..a94511dee 100644 --- a/src/examples/media-session/media-session.c +++ b/src/examples/media-session/media-session.c @@ -1854,7 +1854,7 @@ static int link_nodes(struct impl *impl, struct endpoint_link *link, inport = find_input_port(impl, outnode, outport, innode); if (inport == NULL) { - pw_log_debug(NAME" %p: port %d:%d can't be linked, no input port", impl, + pw_log_debug(NAME" %p: port %d:%d can't be linked", impl, outport->direction, outport->obj.id); continue; } diff --git a/src/examples/media-session/policy-node.c b/src/examples/media-session/policy-node.c index c996bfd54..2e641453a 100644 --- a/src/examples/media-session/policy-node.c +++ b/src/examples/media-session/policy-node.c @@ -447,7 +447,7 @@ static const char *get_device_name(struct node *node) return pw_properties_get(node->obj->obj.props, PW_KEY_NODE_NAME); } -static uint32_t find_device_for_name(struct impl *impl, const char *name, enum spa_direction direction) +static uint32_t find_device_for_name(struct impl *impl, const char *name) { struct node *node; const char *str; @@ -458,8 +458,6 @@ static uint32_t find_device_for_name(struct impl *impl, const char *name, enum s return id; if ((str = get_device_name(node)) == NULL) continue; - if (node->direction == direction) - continue; if (spa_streq(str, name)) return node->obj->obj.id; } @@ -800,9 +798,9 @@ static int rescan_node(struct impl *impl, struct node *n) /* we always honour the target node asked for by the client */ path_id = SPA_ID_INVALID; if ((str = spa_dict_lookup(props, PW_KEY_NODE_TARGET)) != NULL) - path_id = find_device_for_name(impl, str, n->direction); + path_id = find_device_for_name(impl, str); if (path_id == SPA_ID_INVALID && n->obj->target_node != NULL) - path_id = find_device_for_name(impl, n->obj->target_node, n->direction); + path_id = find_device_for_name(impl, n->obj->target_node); pw_log_info("trying to link node %d exclusive:%d reconnect:%d target:%d follows-default:%d", n->id, exclusive, reconnect, path_id, follows_default);