[FFmpeg-cvslog] avfilter/af_afftdn: unbreak custom band noise option processing
Paul B Mahol
git at videolan.org
Tue Mar 15 17:11:22 EET 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Mar 15 10:28:44 2022 +0100| [4a96baa2c8b8b2eaedd9169557cb2344f0660dd3] | committer: Paul B Mahol
avfilter/af_afftdn: unbreak custom band noise option processing
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4a96baa2c8b8b2eaedd9169557cb2344f0660dd3
---
libavfilter/af_afftdn.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavfilter/af_afftdn.c b/libavfilter/af_afftdn.c
index b4a4b4fd65..fb1e031cbf 100644
--- a/libavfilter/af_afftdn.c
+++ b/libavfilter/af_afftdn.c
@@ -564,18 +564,20 @@ static void read_custom_noise(AudioFFTDeNoiseContext *s, int ch)
return;
for (int i = 0; i < NB_PROFILE_BANDS; i++) {
+ float noise;
+
if (!(arg = av_strtok(p, "| ", &saveptr)))
break;
p = NULL;
- ret = av_sscanf(arg, "%f", &band_noise[i]);
+ ret = av_sscanf(arg, "%f", &noise);
if (ret != 1) {
av_log(s, AV_LOG_ERROR, "Custom band noise must be float.\n");
break;
}
- band_noise[i] = av_clipd(band_noise[i], -24., 24.);
+ band_noise[i] = av_clipd(noise, -24., 24.);
}
av_free(custom_noise_str);
More information about the ffmpeg-cvslog
mailing list