forked from pool/wireplumber
Antonio Larrosa
0e3be88b55
- Add patch from upstream to silence a warning on pipewire (since 1.0.5): * 0001-core-set-context.modules.allow-empty-to-silence-warning-in.patch - Add patch from upstream to fix a dangling reference to a device: * 0002-monitor-utils-clear-cam-data-after-creating-nodes.patch - Add patch from upstream to fix BAP node naming: * 0003-monitors_bluez-fix-BAP-device-set-node-naming.patch OBS-URL: https://build.opensuse.org/request/show/1168470 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/wireplumber?expand=0&rev=76
48 lines
1.5 KiB
Diff
48 lines
1.5 KiB
Diff
From 8ee351838dac5ac25224ca2a22bb1a55eace0291 Mon Sep 17 00:00:00 2001
|
|
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
|
|
Date: Wed, 3 Apr 2024 11:32:35 +0300
|
|
Subject: [PATCH] monitor-utils: clear cam data after creating nodes
|
|
|
|
The cam_data structure stores a reference to the "parent" WpSpaDevice
|
|
and doesn't allow it to be destroyed when the monitor detects that
|
|
the device is no longer present. Clear it right after pushing the event
|
|
to make sure there's no dangling reference left around
|
|
|
|
Fixes: #627
|
|
---
|
|
src/scripts/lib/monitor-utils.lua | 11 +++++++++++
|
|
1 file changed, 11 insertions(+)
|
|
|
|
diff --git a/src/scripts/lib/monitor-utils.lua b/src/scripts/lib/monitor-utils.lua
|
|
index 5c58cd68..c23ec1cd 100644
|
|
--- a/src/scripts/lib/monitor-utils.lua
|
|
+++ b/src/scripts/lib/monitor-utils.lua
|
|
@@ -40,6 +40,15 @@ function mutils.get_cam_data (self, dev_string)
|
|
return self.cam_data[dev_num], dev_num
|
|
end
|
|
|
|
+function mutils.clear_cam_data (self, dev_string)
|
|
+ local dev_num = tonumber (dev_string)
|
|
+ if not dev_num then
|
|
+ return
|
|
+ end
|
|
+
|
|
+ self.cam_data[dev_num] = nil
|
|
+end
|
|
+
|
|
function mutils.create_cam_node (self, dev_num)
|
|
local api = nil
|
|
local cam_data = self:get_cam_data (dev_num)
|
|
@@ -65,6 +74,8 @@ function mutils.create_cam_node (self, dev_num)
|
|
e:set_data ("node-sub-id", cam_data[api].id)
|
|
|
|
EventDispatcher.push_event (e)
|
|
+
|
|
+ self:clear_cam_data (dev_num)
|
|
end
|
|
|
|
-- arbitrates between v4l2 and libcamera on who gets to create the device node
|
|
--
|
|
GitLab
|
|
|