avfilter/af_afftdn: unbreak custom band noise option processing

release/5.1
Paul B Mahol 3 years ago
parent 098528ec59
commit 4a96baa2c8
  1. 6
      libavfilter/af_afftdn.c

@ -564,18 +564,20 @@ static void read_custom_noise(AudioFFTDeNoiseContext *s, int ch)
return; return;
for (int i = 0; i < NB_PROFILE_BANDS; i++) { for (int i = 0; i < NB_PROFILE_BANDS; i++) {
float noise;
if (!(arg = av_strtok(p, "| ", &saveptr))) if (!(arg = av_strtok(p, "| ", &saveptr)))
break; break;
p = NULL; p = NULL;
ret = av_sscanf(arg, "%f", &band_noise[i]); ret = av_sscanf(arg, "%f", &noise);
if (ret != 1) { if (ret != 1) {
av_log(s, AV_LOG_ERROR, "Custom band noise must be float.\n"); av_log(s, AV_LOG_ERROR, "Custom band noise must be float.\n");
break; break;
} }
band_noise[i] = av_clipd(band_noise[i], -24., 24.); band_noise[i] = av_clipd(noise, -24., 24.);
} }
av_free(custom_noise_str); av_free(custom_noise_str);

Loading…
Cancel
Save