From bb4fdcd93636e40e6f90758052d0dc3d30bc6dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Sat, 12 Oct 2024 15:36:24 +0200 Subject: [PATCH] wmstatus: fix noise adjustment logic It was possible to trigger an untracked playback stream. --- wmstatus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wmstatus.c b/wmstatus.c index e6fa004..0c0136e 100644 --- a/wmstatus.c +++ b/wmstatus.c @@ -2249,7 +2249,7 @@ action_noise_adjust (struct app_context *ctx, const struct strv *args) long arg = strtol (args->vector[0], NULL, 10); ctx->noise_fadeout_samples = 0; ctx->noise_fadeout_iterator = 0; - if (!ctx->noise_end_time && (arg < 0 || !noise_start (ctx))) + if (!ctx->noise_end_time && (arg <= 0 || !noise_start (ctx))) return; time_t now = time (NULL);