control: fix event compare function

We can only compare UMP when both types are 2 or 4, so it must be
different from 2 *and* 4 to be rejected.

Fixes #4899
This commit is contained in:
Wim Taymans 2025-09-16 10:47:12 +02:00
parent af6571d0c7
commit 03c5f493dc
2 changed files with 4 additions and 4 deletions

View file

@ -679,8 +679,8 @@ static inline int event_sort(struct spa_pod_control *a, const void *abody,
const uint32_t *da = abody, *db = bbody;
if (SPA_POD_BODY_SIZE(&a->value) < 4 || SPA_POD_BODY_SIZE(&b->value) < 4)
return 0;
if ((da[0] >> 28) != 2 || (da[0] >> 28) != 4 ||
(db[0] >> 28) != 2 || (db[0] >> 28) != 4)
if (((da[0] >> 28) != 2 && (da[0] >> 28) != 4) ||
((db[0] >> 28) != 2 && (db[0] >> 28) != 4))
return 0;
return event_compare(da[0] >> 16, db[0] >> 16);
}