diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index 78b7a7c83d..c09f8b034b 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -538,10 +538,12 @@ static av_cold int init(AVFilterContext *ctx) last_weight = av_strtod(p, &p); s->weights[i] = last_weight; s->weight_sum += FFABS(last_weight); - if (p && *p) + if (p && *p) { p++; - else + } else { + i++; break; + } } for (; i < s->nb_inputs; i++) {