diff options
-rw-r--r-- | src/examples/media-session/media-session.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/examples/media-session/media-session.c b/src/examples/media-session/media-session.c index 2a26f228..9109337c 100644 --- a/src/examples/media-session/media-session.c +++ b/src/examples/media-session/media-session.c @@ -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; } |