mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
jack: don't sort ports on alias
The alias is not a good property to sort on, it contains the object path and could sort playback_11 before playback_2. Just group ports of the same node together, then sort by port_id and if that fails, use the serial number. See #2260
This commit is contained in:
parent
cc39644253
commit
617405e08c
1 changed files with 1 additions and 2 deletions
|
|
@ -5411,8 +5411,7 @@ static int port_compare_func(const void *v1, const void *v2)
|
|||
res = is_def2 - is_def1;
|
||||
else if ((*o1)->port.priority != (*o2)->port.priority)
|
||||
res = (*o2)->port.priority - (*o1)->port.priority;
|
||||
else if ((res = strcmp((*o1)->port.alias1, (*o2)->port.alias1)) == 0) {
|
||||
res = (*o1)->port.node_id - (*o2)->port.node_id;
|
||||
else if ((res = (*o1)->port.node_id - (*o2)->port.node_id)) {
|
||||
if (res == 0)
|
||||
res = (*o1)->port.system_id - (*o2)->port.system_id;
|
||||
if (res == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue