]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/af_adelay.c
avcodec/utils: Remove ff_codec_open2_recursive()
[ffmpeg] / libavfilter / af_adelay.c
index c9647771f2e203d8b4973f2be06f1a32e11902b8..6ac81c2a3e04cf77b8fd8af577f5b3cccf8a8d14 100644 (file)
@@ -155,7 +155,10 @@ static int config_input(AVFilterLink *inlink)
         ret = av_sscanf(arg, "%d%c", &d->delay, &type);
         if (ret != 2 || type != 'S') {
             div = type == 's' ? 1.0 : 1000.0;
-            av_sscanf(arg, "%f", &delay);
+            if (av_sscanf(arg, "%f", &delay) != 1) {
+                av_log(ctx, AV_LOG_ERROR, "Invalid syntax for delay.\n");
+                return AVERROR(EINVAL);
+            }
             d->delay = delay * inlink->sample_rate / div;
         }