Commit e807ed58 authored by Max Kellermann's avatar Max Kellermann

output/PipeWire: ignore SPA_PROP_channelVolumes if n_values==0

After connecting, PipeWire sometimes sends SPA_PROP_channelVolumes with no values, and this led to "volume=-NaN".
parent f0894425
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment