mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
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>
(cherry picked from commit 2d0d502ff1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
adab1e6f0c
commit
dd3075434e
1 changed files with 2 additions and 2 deletions
|
|
@ -417,8 +417,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…
Add table
Add a link
Reference in a new issue