context: use first data-loop class when unset

When a node does not specify a data-loop class, use the class of the
first data loop. This makes the nodes spread out over the first
(default) data-loop class.
This commit is contained in:
Wim Taymans 2024-05-02 09:33:38 +02:00
parent 3e760ea7d7
commit c8efa0fae2

View file

@ -665,10 +665,8 @@ static struct pw_data_loop *acquire_data_loop(struct impl *impl, const char *nam
const char *ln = l->impl->loop->name;
int score = 0;
if (!name && !klass) {
best_loop = l;
break;
}
if (klass == NULL)
klass = l->impl->class;
if (name && ln && fnmatch(name, ln, FNM_EXTMATCH) == 0)
score += 2;