Unified · Split
| @@ -155,7 +155,10 @@ static int config_input(AVFilterLink *inlink) · 154 unmodified lines | |||
| 155 | ret = av_sscanf(arg, "%d%c", &d->delay, &type); | 155 | ret = av_sscanf(arg, "%d%c", &d->delay, &type); |
| 156 | if (ret != 2 || type != 'S') { | 156 | if (ret != 2 || type != 'S') { |
| 157 | div = type == 's' ? 1.0 : 1000.0; | 157 | div = type == 's' ? 1.0 : 1000.0; |
| 158 | av_sscanf(arg, "%f", &delay); | 158 | if (av_sscanf(arg, "%f", &delay) != 1) { |
| 159 | av_log(ctx, AV_LOG_ERROR, "Invalid syntax for delay.\n"); | ||
| 160 | return AVERROR(EINVAL); | ||
| 161 | } | ||
| 159 | d->delay = delay * inlink->sample_rate / div; | 162 | d->delay = delay * inlink->sample_rate / div; |
| 160 | } | 163 | } |
| 161 | 164 | ||