diff --git a/src/output/plugins/PipeWireOutputPlugin.cxx b/src/output/plugins/PipeWireOutputPlugin.cxx index cfa45292d..a64471a15 100644 --- a/src/output/plugins/PipeWireOutputPlugin.cxx +++ b/src/output/plugins/PipeWireOutputPlugin.cxx @@ -223,6 +223,9 @@ private: } void OnChannelVolumes(const struct pw_stream_control &control) noexcept { + if (control.n_values < 1) + return; + float sum = std::accumulate(control.values, control.values + control.n_values, 0.0f);