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>
release/7.1
Michael Niedermayer 9 months ago
parent cef720ab42
commit 2d0d502ff1
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 4
      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);
}

Loading…
Cancel
Save