Unified · Split
| @@ -564,18 +564,20 @@ static void read_custom_noise(AudioFFTDeNoiseContext *s, int ch) · 563 unmodified lines | |||
| 564 | return; | 564 | return; |
| 565 | 565 | ||
| 566 | for (int i = 0; i < NB_PROFILE_BANDS; i++) { | 566 | for (int i = 0; i < NB_PROFILE_BANDS; i++) { |
| 567 | float noise; | ||
| 568 | |||
| 567 | if (!(arg = av_strtok(p, "| ", &saveptr))) | 569 | if (!(arg = av_strtok(p, "| ", &saveptr))) |
| 568 | break; | 570 | break; |
| 569 | 571 | ||
| 570 | p = NULL; | 572 | p = NULL; |
| 571 | 573 | ||
| 572 | ret = av_sscanf(arg, "%f", &band_noise[i]); | 574 | ret = av_sscanf(arg, "%f", &noise); |
| 573 | if (ret != 1) { | 575 | if (ret != 1) { |
| 574 | av_log(s, AV_LOG_ERROR, "Custom band noise must be float.\n"); | 576 | av_log(s, AV_LOG_ERROR, "Custom band noise must be float.\n"); |
| 575 | break; | 577 | break; |
| 576 | } | 578 | } |
| 577 | 579 | ||
| 578 | band_noise[i] = av_clipd(band_noise[i], -24., 24.); | 580 | band_noise[i] = av_clipd(noise, -24., 24.); |
| 579 | } | 581 | } |
| 580 | 582 | ||
| 581 | av_free(custom_noise_str); | 583 | av_free(custom_noise_str); |