Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2015-09-12 10:31:49 +0300
committerPaul B Mahol <onemda@gmail.com>2015-09-12 16:07:55 +0300
commita0a2ca024bd0e6e3cd6cfa3fb878871a18a611e6 (patch)
tree1e138682090d748972277edc9e17afd87ac3241c /libavfilter/af_ladspa.c
parent56291434335c56fd436646338e5088c2c90b81bb (diff)
avfilter/af_ladspa: support simpler syntax for controls
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/af_ladspa.c')
-rw-r--r--libavfilter/af_ladspa.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c
index 1efe3f0bf7..655c01811d 100644
--- a/libavfilter/af_ladspa.c
+++ b/libavfilter/af_ladspa.c
@@ -396,7 +396,7 @@ static av_cold int init(AVFilterContext *ctx)
AVFilterPad pad = { NULL };
char *p, *arg, *saveptr = NULL;
unsigned long nb_ports;
- int i;
+ int i, j = 0;
if (!s->dl_name) {
av_log(ctx, AV_LOG_ERROR, "No plugin name provided\n");
@@ -543,8 +543,11 @@ static av_cold int init(AVFilterContext *ctx)
p = NULL;
if (sscanf(arg, "c%d=%f", &i, &val) != 2) {
- av_log(ctx, AV_LOG_ERROR, "Invalid syntax.\n");
- return AVERROR(EINVAL);
+ if (sscanf(arg, "%f", &val) != 1) {
+ av_log(ctx, AV_LOG_ERROR, "Invalid syntax.\n");
+ return AVERROR(EINVAL);
+ }
+ i = j++;
}
if ((ret = set_control(ctx, i, val)) < 0)