mumble: backport fix for segfault with pipewire

This commit is contained in:
z411 2023-05-05 03:13:27 -04:00 committed by classabbyamp
parent 28d11fc3e7
commit 7433b37ff3
2 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,38 @@
From 24b9276d97cac459284143b936e46b626d7396f0 Mon Sep 17 00:00:00 2001
From: Robert Adam <dev@robert-adam.de>
Date: Tue, 11 Apr 2023 13:50:47 +0200
Subject: [PATCH] FIX(client): PipeWire crash
When destroying the PipeWire object we first destroyed the thread loop
and then the stream, but this has to be done in reverse order in order
to avoid crashes.
Fixes #6101
Source: https://github.com/mumble-voip/mumble/pull/6103
---
src/mumble/PipeWire.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/mumble/PipeWire.cpp b/src/mumble/PipeWire.cpp
index 91924e4fb1..c206ab5bbb 100644
--- a/src/mumble/PipeWire.cpp
+++ b/src/mumble/PipeWire.cpp
@@ -213,13 +213,14 @@ PipeWireEngine::~PipeWireEngine() {
return;
}
+ if (m_stream) {
+ pws->pw_stream_destroy(m_stream);
+ }
+
if (m_thread) {
pws->pw_thread_loop_destroy(m_thread);
}
- if (m_stream) {
- pws->pw_stream_destroy(m_stream);
- }
if (m_loop) {
pws->pw_loop_destroy(m_loop);

View File

@ -1,7 +1,7 @@
# Template file for 'mumble'
pkgname=mumble
version=1.4.287
revision=2
revision=3
build_style=cmake
make_cmd=make
configure_args="-Doverlay-xcompile=OFF -Dbundled-opus=OFF