mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-12-21 02:42:18 +00:00
Sorry, I noticed Fedora has some others which I initially skipped.
Followup to 211924340d.
Signed-off-by: Sam James <sam@gentoo.org>
48 lines
2 KiB
Diff
48 lines
2 KiB
Diff
https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/5212649ee1b9e494ff2a3eb16922a3ef5c6987a5
|
|
|
|
From 5212649ee1b9e494ff2a3eb16922a3ef5c6987a5 Mon Sep 17 00:00:00 2001
|
|
From: Wim Taymans <wtaymans@redhat.com>
|
|
Date: Tue, 16 Sep 2025 10:47:12 +0200
|
|
Subject: [PATCH] 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
|
|
---
|
|
pipewire-jack/src/pipewire-jack.c | 4 ++--
|
|
spa/plugins/control/mixer.c | 4 ++--
|
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c
|
|
index 2b9d21948a..1867aebae0 100644
|
|
--- a/pipewire-jack/src/pipewire-jack.c
|
|
+++ b/pipewire-jack/src/pipewire-jack.c
|
|
@@ -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);
|
|
}
|
|
diff --git a/spa/plugins/control/mixer.c b/spa/plugins/control/mixer.c
|
|
index cfe3c394b2..feb622435a 100644
|
|
--- a/spa/plugins/control/mixer.c
|
|
+++ b/spa/plugins/control/mixer.c
|
|
@@ -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);
|
|
}
|
|
--
|
|
GitLab
|