aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-06-10 23:18:53 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-07-07 23:36:28 +0200
commit2d0d502ff10378e545a1fe42a9503ab44d19fa67 (patch)
tree60dc11cb3bdde35ee285e929cb4c39fd097ba203
parentcef720ab429244ac9e56f48d983d6086e0a227a7 (diff)
downloadffmpeg-2d0d502ff10378e545a1fe42a9503ab44d19fa67.tar.gz
avfilter/af_mcompand: compute half frequency in double
Fixes: CID1422217 Result is not floating-point Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavfilter/af_mcompand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/af_mcompand.c b/libavfilter/af_mcompand.c
index 89fe806a02..e63820efce 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);
}