History

avfilter/af_mcompand: compute half frequency in double

Fixes: CID1422217 Result is not floating-point

Michael Niedermayer committed 2 years ago

Commit 2d0d5021 parent cef720a1 file · +2 −2Browse files

Unified · Split

libavfilter/af_mcompand.c+2−2
@@ -418,8 +418,8 @@ static int config_output(AVFilterLink *outlink) · 417 unmodified lines
418418 }
419419
420420 new_nb_items += sscanf(tstr2, "%lf", &s->bands[i].topfreq) == 1;
421− if (s->bands[i].topfreq < 0 || s->bands[i].topfreq >= outlink->sample_rate / 2) {
422− 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);
421+ if (s->bands[i].topfreq < 0 || s->bands[i].topfreq >= outlink->sample_rate / 2.0) {
422+ 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);
423423 return AVERROR(EINVAL);
424424 }
425425

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t