[FFmpeg-cvslog] avfilter/af_ladspa: use av_sscanf()

Paul B Mahol git at videolan.org
Sun Nov 18 22:24:47 EET 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Nov 18 20:38:24 2018 +0100| [f79750bc320a379478784a9b736adf032d06485d] | committer: Paul B Mahol

avfilter/af_ladspa: use av_sscanf()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f79750bc320a379478784a9b736adf032d06485d
---

 libavfilter/af_ladspa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c
index 3be26bc849..a8562fc073 100644
--- a/libavfilter/af_ladspa.c
+++ b/libavfilter/af_ladspa.c
@@ -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);



More information about the ffmpeg-cvslog mailing list