mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avfilter/af_afftdn: use av_sscanf()
This commit is contained in:
parent
0c7fb6e4a0
commit
80265dba3d
@ -564,7 +564,7 @@ static void read_custom_noise(AudioFFTDeNoiseContext *s, int ch)
|
|||||||
|
|
||||||
p = NULL;
|
p = NULL;
|
||||||
|
|
||||||
ret = sscanf(arg, "%d", &band_noise[i]);
|
ret = av_sscanf(arg, "%d", &band_noise[i]);
|
||||||
if (ret != 1) {
|
if (ret != 1) {
|
||||||
av_log(s, AV_LOG_ERROR, "Custom band noise must be integer.\n");
|
av_log(s, AV_LOG_ERROR, "Custom band noise must be integer.\n");
|
||||||
break;
|
break;
|
||||||
@ -1390,7 +1390,7 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar
|
|||||||
!strcmp(cmd, "noise_reduction")) {
|
!strcmp(cmd, "noise_reduction")) {
|
||||||
float nr;
|
float nr;
|
||||||
|
|
||||||
if (sscanf(args, "%f", &nr) == 1) {
|
if (av_sscanf(args, "%f", &nr) == 1) {
|
||||||
s->noise_reduction = av_clipf(nr, 0.01, 97);
|
s->noise_reduction = av_clipf(nr, 0.01, 97);
|
||||||
need_reset = 1;
|
need_reset = 1;
|
||||||
}
|
}
|
||||||
@ -1398,7 +1398,7 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar
|
|||||||
!strcmp(cmd, "noise_floor")) {
|
!strcmp(cmd, "noise_floor")) {
|
||||||
float nf;
|
float nf;
|
||||||
|
|
||||||
if (sscanf(args, "%f", &nf) == 1) {
|
if (av_sscanf(args, "%f", &nf) == 1) {
|
||||||
s->noise_floor = av_clipf(nf, -80, -20);
|
s->noise_floor = av_clipf(nf, -80, -20);
|
||||||
need_reset = 1;
|
need_reset = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user