From d8f9c7bae412469ed73e08fc19fbaa0fa1c734e3 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 12 Jul 2022 15:14:58 +0200 Subject: [PATCH] Add patch to avoid crash in JACK. --- ...k-only-mix-when-we-have-input-to-mix.patch | 26 +++++++++++++++++++ pipewire.spec | 8 ++++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 0001-jack-only-mix-when-we-have-input-to-mix.patch diff --git a/0001-jack-only-mix-when-we-have-input-to-mix.patch b/0001-jack-only-mix-when-we-have-input-to-mix.patch new file mode 100644 index 0000000..7bb6160 --- /dev/null +++ b/0001-jack-only-mix-when-we-have-input-to-mix.patch @@ -0,0 +1,26 @@ +From 510fb091667373069781d78e02e731b044c0a3e9 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Tue, 12 Jul 2022 15:10:02 +0200 +Subject: [PATCH] jack: only mix when we have input to mix + +Avoids a crash when starting ardour6. +--- + pipewire-jack/src/pipewire-jack.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c +index 2a9ebc40d..04c63984d 100644 +--- a/pipewire-jack/src/pipewire-jack.c ++++ b/pipewire-jack/src/pipewire-jack.c +@@ -4449,7 +4449,7 @@ static void *get_buffer_input_float(struct port *p, jack_nframes_t frames) + } + if (n_ptr == 1) { + ptr = mix_ptr[0]; +- } else { ++ } else if (n_ptr > 1) { + ptr = p->emptyptr; + mix_function(ptr, mix_ptr, n_ptr, ptr_aligned, frames); + p->zeroed = false; +-- +2.36.1 + diff --git a/pipewire.spec b/pipewire.spec index c68cc61..9cc0aa3 100644 --- a/pipewire.spec +++ b/pipewire.spec @@ -9,7 +9,7 @@ %global ms_version 0.4.1 # For rpmdev-bumpspec and releng automation -%global baserelease 1 +%global baserelease 2 #global snapdate 20210107 #global gitcommit b17db2cebc1a5ab2c01851d29c05f79cd2f262bb @@ -80,6 +80,7 @@ Source1: https://gitlab.freedesktop.org/pipewire/media-session/-/archive/ %endif ## upstream patches +Patch0001: 0001-jack-only-mix-when-we-have-input-to-mix.patch ## upstreamable patches @@ -618,7 +619,10 @@ systemctl --no-reload preset --global pipewire.socket >/dev/null 2>&1 || : %endif %changelog -* Thu Jul 12 2022 Wim Taymans - 0.3.55-1 +* Tue Jul 12 2022 Wim Taymans - 0.3.55-2 +- Add patch to avoid crash in JACK. + +* Tue Jul 12 2022 Wim Taymans - 0.3.55-1 - Update version to 0.3.55 * Thu Jul 07 2022 Wim Taymans - 0.3.54-1