[FFmpeg-devel] [PATCH v1 2/3] avfilter/vf_mix: Check sscanf() return value
lance.lmwang at gmail.com
lance.lmwang at gmail.com
Thu Mar 26 01:04:23 EET 2020
From: Limin Wang <lance.lmwang at gmail.com>
Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
libavfilter/vf_mix.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavfilter/vf_mix.c b/libavfilter/vf_mix.c
index 9e1ae79e00..e47f7e2301 100644
--- a/libavfilter/vf_mix.c
+++ b/libavfilter/vf_mix.c
@@ -108,7 +108,8 @@ static av_cold int init(AVFilterContext *ctx)
break;
p = NULL;
- av_sscanf(arg, "%f", &s->weights[i]);
+ if (av_sscanf(arg, "%f", &s->weights[i]) != 1)
+ continue;
s->wfactor += s->weights[i];
last = i;
}
--
2.21.0
More information about the ffmpeg-devel
mailing list