提交 d1afd3e1 编写于 作者: V Vittorio Giovara

vf_format: check input validity

CC: libav-stable@libav.org
上级 7b48bf95
......@@ -59,6 +59,11 @@ static av_cold int init(AVFilterContext *ctx)
int nb_formats = 1;
int i;
if (!s->pix_fmts) {
av_log(ctx, AV_LOG_ERROR, "Empty output format string.\n");
return AVERROR(EINVAL);
}
/* count the formats */
cur = s->pix_fmts;
while ((cur = strchr(cur, '|'))) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册