From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 071CE4B68E for ; Tue, 11 Jun 2024 13:44:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E3CC968D842; Tue, 11 Jun 2024 16:44:32 +0300 (EEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 466F368D69E for ; Tue, 11 Jun 2024 16:44:26 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 9FC081C0007 for ; Tue, 11 Jun 2024 13:44:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1718113465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JBJi2qanfZthi3asXEe92TTufa16h6CtVUU9aDl9nM4=; b=G+jhhEEJHW4FR1yf67P4EQYGjKuxXjJkrTY96sGMVXoQ+Lfpn09B3GgY76k+gRjOb7VHb/ DoKsrX7yR7uAg0AnBFUzFAYXKd6s32YUOl/ED5s8ia/W2N8ZojOPH+EmKVUPNr+sAnAXK7 M4m/ClZuuwwvDT77M7sZ4un2QThz5yGlZYZDsCZoDxV3Z6rlPTAjLtgz9H9KGP/MIaWiyC r/pUwBCHOUSXcqCAUrZ0Qsxk+rMkFsWMGjkIJW0SpQ0Jb4RPgGZmfiradiEbyL2QCQgfyP jxAyhcua3Iv+/kQb0rtb7HvkWz4DG4ZpLe6xuYQcNLZbXsqvuny0v/c2i63r2g== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 11 Jun 2024 15:44:21 +0200 Message-ID: <20240611134422.3172010-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240611134422.3172010-1-michael@niedermayer.cc> References: <20240611134422.3172010-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 3/4] avfilter/af_mcompand: compute half frequency in double X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Fixes: CID1422217 Result is not floating-point Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/af_mcompand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/af_mcompand.c b/libavfilter/af_mcompand.c index 89fe806a021..e63820efceb 100644 --- a/libavfilter/af_mcompand.c +++ b/libavfilter/af_mcompand.c @@ -418,8 +418,8 @@ static int config_output(AVFilterLink *outlink) } new_nb_items += sscanf(tstr2, "%lf", &s->bands[i].topfreq) == 1; - if (s->bands[i].topfreq < 0 || s->bands[i].topfreq >= outlink->sample_rate / 2) { - av_log(ctx, AV_LOG_ERROR, "crossover_frequency: %f, should be >=0 and lower than half of sample rate: %d.\n", s->bands[i].topfreq, outlink->sample_rate / 2); + if (s->bands[i].topfreq < 0 || s->bands[i].topfreq >= outlink->sample_rate / 2.0) { + av_log(ctx, AV_LOG_ERROR, "crossover_frequency: %f, should be >=0 and lower than half of sample rate: %f.\n", s->bands[i].topfreq, outlink->sample_rate / 2.0); return AVERROR(EINVAL); } -- 2.45.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".