adapter: number unknown ports from 1 instead of 0

This makes it like what jack does.
This commit is contained in:
Wim Taymans 2021-02-17 10:14:24 +01:00
parent c7b7afa664
commit 38a7333608

View file

@ -128,7 +128,7 @@ static void node_port_init(void *data, struct pw_impl_port *port)
if ((str = pw_properties_get(old, PW_KEY_AUDIO_CHANNEL)) == NULL || if ((str = pw_properties_get(old, PW_KEY_AUDIO_CHANNEL)) == NULL ||
strcmp(str, "UNK") == 0) { strcmp(str, "UNK") == 0) {
snprintf(position, sizeof(position), "%d", pw_impl_port_get_id(port)); snprintf(position, sizeof(position), "%d", pw_impl_port_get_id(port) + 1);
str = position; str = position;
} }
if (direction == n->direction) { if (direction == n->direction) {