]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/af_alimiter.c
lavfi: add new iteration API
[ffmpeg] / libavfilter / af_alimiter.c
index 0fc8e6baa3fb792b5272c5ccd4172e5b54c1ce25..c41e95576f760e533f709ffbeac23d37a5263c6d 100644 (file)
@@ -327,6 +327,11 @@ static int config_input(AVFilterLink *inlink)
     s->buffer_size = inlink->sample_rate * s->attack * inlink->channels;
     s->buffer_size -= s->buffer_size % inlink->channels;
 
+    if (s->buffer_size <= 0) {
+        av_log(ctx, AV_LOG_ERROR, "Attack is too small.\n");
+        return AVERROR(EINVAL);
+    }
+
     return 0;
 }