mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
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:
parent
24ab601201
commit
5212649ee1
2 changed files with 4 additions and 4 deletions
|
|
@ -1513,8 +1513,8 @@ static inline int event_sort(struct spa_pod_control *a, struct spa_pod_control *
|
|||
uint32_t *sa = SPA_POD_BODY(&a->value), *sb = SPA_POD_BODY(&b->value);
|
||||
if (SPA_POD_BODY_SIZE(&a->value) < 4 || SPA_POD_BODY_SIZE(&b->value) < 4)
|
||||
return 0;
|
||||
if ((sa[0] >> 28) != 2 || (sa[0] >> 28) != 4 ||
|
||||
(sb[0] >> 28) != 2 || (sb[0] >> 28) != 4)
|
||||
if (((sa[0] >> 28) != 2 && (sa[0] >> 28) != 4) ||
|
||||
((sb[0] >> 28) != 2 && (sb[0] >> 28) != 4))
|
||||
return 0;
|
||||
return event_compare(sa[0] >> 16, sb[0] >> 16);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -662,8 +662,8 @@ static inline int event_sort(struct spa_pod_control *a, struct spa_pod_control *
|
|||
uint32_t *da = SPA_POD_BODY(&a->value), *db = SPA_POD_BODY(&b->value);
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue