]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/af_ladspa: use av_sscanf()
authorPaul B Mahol <onemda@gmail.com>
Sun, 18 Nov 2018 19:38:24 +0000 (20:38 +0100)
committerPaul B Mahol <onemda@gmail.com>
Sun, 18 Nov 2018 20:21:18 +0000 (21:21 +0100)
libavfilter/af_ladspa.c

index 3be26bc849db6adc51df5fe7c0ea5b6002ccd1cb..a8562fc073527d697d22c8341598a018eafd137b 100644 (file)
@@ -548,8 +548,8 @@ static av_cold int init(AVFilterContext *ctx)
             break;
         p = NULL;
 
-        if (sscanf(arg, "c%d=%f", &i, &val) != 2) {
-            if (sscanf(arg, "%f", &val) != 1) {
+        if (av_sscanf(arg, "c%d=%f", &i, &val) != 2) {
+            if (av_sscanf(arg, "%f", &val) != 1) {
                 av_log(ctx, AV_LOG_ERROR, "Invalid syntax.\n");
                 return AVERROR(EINVAL);
             }
@@ -715,7 +715,7 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar
     LADSPA_Data value;
     unsigned long port;
 
-    if (sscanf(cmd, "c%ld", &port) + sscanf(args, "%f", &value) != 2)
+    if (av_sscanf(cmd, "c%ld", &port) + av_sscanf(args, "%f", &value) != 2)
         return AVERROR(EINVAL);
 
     return set_control(ctx, port, value);