wireplumber/0001-object-manager-reduce-the-amount-of-globals-that-initially.patch
Antonio Larrosa 31f7bb4dce Accepting request 1121397 from home:alarrosa:branches:multimedia:libs
- Add patch from upstream that fixes too many matches for property
  interest:
  * 0001-object-manager-reduce-the-amount-of-globals-that-initially.patch
- Add patch from upstream that fixes an odd failure of a test after
  applying the previous patch:
  * 0002-object-manager-use-an-idle-callback-to-expose-tmp-globals.patch
- Add patch from upstream that adds ability to hide parent nodes,
  which is useful to prevent hardware misuse or damage by poorly
  behaves/configured clients:
  * 0001-policy-dsp-add-ability-to-hide-parent-nodes.patch

OBS-URL: https://build.opensuse.org/request/show/1121397
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=61
2023-10-31 09:23:11 +00:00

37 lines
1.6 KiB
Diff

From 5fc7e68d109b646c550e3fdeddebadc5047137a2 Mon Sep 17 00:00:00 2001
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date: Mon, 23 Oct 2023 23:04:02 +0300
Subject: [PATCH] object-manager: reduce the amount of globals that initially
match the interest
With the previous check, any global matching either the type or the global
properties of the interest would be considered for inclusion in the object
manager and would be prepared only to fail the same check later.
The correct way to check is (variable & (X|Y) == (X|Y)), which is what
SPA_FLAG_IS_SET() expands to.
Fixes #517
---
lib/wp/object-manager.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/wp/object-manager.c b/lib/wp/object-manager.c
index 6f58653ba..dea7857e1 100644
--- a/lib/wp/object-manager.c
+++ b/lib/wp/object-manager.c
@@ -638,8 +638,8 @@ wp_object_manager_is_interested_in_global (WpObjectManager * self,
/* and consider the manager interested if the type and the globals match...
if pw_properties / g_properties fail, that's ok because they are not
known yet (the proxy is likely NULL and properties not yet retrieved) */
- if (match & (WP_INTEREST_MATCH_GTYPE |
- WP_INTEREST_MATCH_PW_GLOBAL_PROPERTIES)) {
+ if (SPA_FLAG_IS_SET (match, (WP_INTEREST_MATCH_GTYPE |
+ WP_INTEREST_MATCH_PW_GLOBAL_PROPERTIES))) {
gpointer ft = g_hash_table_lookup (self->features,
GSIZE_TO_POINTER (global->type));
*wanted_features = (WpObjectFeatures) GPOINTER_TO_UINT (ft);
--
GitLab