From f08944253bcb7a5426d212eb35f886399420258f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 8 Jul 2022 17:59:07 +0200 Subject: [PATCH] output/PipeWire: check SPA_PROP_channelVolumes, not control name Since PipeWire 0.3.53, there is no control name anymore, therefore the name check doesn't work anymore, breaking volume change events. This obsoletes the crash bug fix in commit 2ee57f9b0d8d08c554392e6b832a335593a7555d --- NEWS | 3 +-- src/output/plugins/PipeWireOutputPlugin.cxx | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index c9f5e3919..355281c61 100644 --- a/NEWS +++ b/NEWS @@ -5,12 +5,11 @@ ver 0.23.8 (not yet released) - cdio_paranoia: fix crash if no drive was found - cdio_paranoia: faster cancellation - cdio_paranoia: don't scan for replay gain tags -* output - - pipewire: fix crash with PipeWire 0.3.53 * mixer - better error messages - alsa: fix setting volume before playback starts - pipewire: fix crash bug + - pipewire: fix volume change events with PipeWire 0.3.53 * support libfmt 9 ver 0.23.7 (2022/05/09) diff --git a/src/output/plugins/PipeWireOutputPlugin.cxx b/src/output/plugins/PipeWireOutputPlugin.cxx index d187a5bc9..cfa45292d 100644 --- a/src/output/plugins/PipeWireOutputPlugin.cxx +++ b/src/output/plugins/PipeWireOutputPlugin.cxx @@ -236,9 +236,11 @@ private: void ControlInfo([[maybe_unused]] uint32_t id, const struct pw_stream_control &control) noexcept { - if (control.name != nullptr && - StringIsEqual(control.name, "Channel Volumes")) + switch (id) { + case SPA_PROP_channelVolumes: OnChannelVolumes(control); + break; + } } static void ControlInfo(void *data, uint32_t id,