summaryrefslogtreecommitdiff
path: root/media-video/wireplumber/files/wireplumber-0.4.11-alsa-lua-crash.patch
blob: 3bc8bbd08bb690a6f13c641d81e51f7a97b6b71a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
https://gitlab.freedesktop.org/pipewire/wireplumber/-/commit/c16e637c329bc9dda8544b18f5bd47a8d63ee253

From c16e637c329bc9dda8544b18f5bd47a8d63ee253 Mon Sep 17 00:00:00 2001
From: George Kiagiadakis <george.kiagiadakis@collabora.com>
Date: Thu, 7 Jul 2022 20:58:36 +0300
Subject: [PATCH] alsa: use "obj_type" as a variable name to avoid shadowing
 lua's "type" function

This causes a crash when running in a VM because the code tries to
execute lua's "type()" and ends up executing the local string variable...

Fixes: #303
--- a/src/scripts/monitors/alsa.lua
+++ b/src/scripts/monitors/alsa.lua
@@ -49,7 +49,7 @@ function nonempty(str)
   return str ~= "" and str or nil
 end
 
-function createNode(parent, id, type, factory, properties)
+function createNode(parent, id, obj_type, factory, properties)
   local dev_props = parent.properties
 
   -- set the device id and spa factory name; REQUIRED, do not change
@@ -199,7 +199,7 @@ function createDevice(parent, id, factory, properties)
   end
 end
 
-function prepareDevice(parent, id, type, factory, properties)
+function prepareDevice(parent, id, obj_type, factory, properties)
   -- ensure the device has an appropriate name
   local name = "alsa_card." ..
     (properties["device.name"] or
GitLab