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
af6571d0c7
commit
03c5f493dc
2 changed files with 4 additions and 4 deletions
|
|
@ -1523,8 +1523,8 @@ static inline int event_sort(struct spa_pod_control *a, const void *abody,
|
||||||
const uint32_t *sa = abody, *sb = bbody;
|
const uint32_t *sa = abody, *sb = bbody;
|
||||||
if (SPA_POD_BODY_SIZE(&a->value) < 4 || SPA_POD_BODY_SIZE(&b->value) < 4)
|
if (SPA_POD_BODY_SIZE(&a->value) < 4 || SPA_POD_BODY_SIZE(&b->value) < 4)
|
||||||
return 0;
|
return 0;
|
||||||
if ((sa[0] >> 28) != 2 || (sa[0] >> 28) != 4 ||
|
if (((sa[0] >> 28) != 2 && (sa[0] >> 28) != 4) ||
|
||||||
(sb[0] >> 28) != 2 || (sb[0] >> 28) != 4)
|
((sb[0] >> 28) != 2 && (sb[0] >> 28) != 4))
|
||||||
return 0;
|
return 0;
|
||||||
return event_compare(sa[0] >> 16, sb[0] >> 16);
|
return event_compare(sa[0] >> 16, sb[0] >> 16);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -679,8 +679,8 @@ static inline int event_sort(struct spa_pod_control *a, const void *abody,
|
||||||
const uint32_t *da = abody, *db = bbody;
|
const uint32_t *da = abody, *db = bbody;
|
||||||
if (SPA_POD_BODY_SIZE(&a->value) < 4 || SPA_POD_BODY_SIZE(&b->value) < 4)
|
if (SPA_POD_BODY_SIZE(&a->value) < 4 || SPA_POD_BODY_SIZE(&b->value) < 4)
|
||||||
return 0;
|
return 0;
|
||||||
if ((da[0] >> 28) != 2 || (da[0] >> 28) != 4 ||
|
if (((da[0] >> 28) != 2 && (da[0] >> 28) != 4) ||
|
||||||
(db[0] >> 28) != 2 || (db[0] >> 28) != 4)
|
((db[0] >> 28) != 2 && (db[0] >> 28) != 4))
|
||||||
return 0;
|
return 0;
|
||||||
return event_compare(da[0] >> 16, db[0] >> 16);
|
return event_compare(da[0] >> 16, db[0] >> 16);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue