mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
media-session: always prefer a port match
First find a port match and then increase the score when the port was unconnected.
This commit is contained in:
parent
201d762b2a
commit
193b9afdff
1 changed files with 2 additions and 2 deletions
|
|
@ -1507,8 +1507,6 @@ static int score_ports(struct sm_port *out, struct sm_port *in)
|
|||
in->type != out->type)
|
||||
return 0;
|
||||
|
||||
if (!in->visited)
|
||||
score += 5;
|
||||
if (out->channel == in->channel)
|
||||
score += 100;
|
||||
else if ((out->channel == SPA_AUDIO_CHANNEL_SL && in->channel == SPA_AUDIO_CHANNEL_RL) ||
|
||||
|
|
@ -1523,6 +1521,8 @@ static int score_ports(struct sm_port *out, struct sm_port *in)
|
|||
score += 30;
|
||||
else if (in->channel == SPA_AUDIO_CHANNEL_MONO)
|
||||
score += 20;
|
||||
if (score > 0 && !in->visited)
|
||||
score += 5;
|
||||
return score;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue