Commit edc6f3da authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Carl Eugen Hoyos

avfilter/vf_format: check that the format list is not empty

Fixes Ticket3210
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ee16e0ca)
parent 8763aca3
......@@ -55,6 +55,9 @@ static av_cold int init(AVFilterContext *ctx)
int pix_fmt_name_len, ret;
enum AVPixelFormat pix_fmt;
if (!s->pix_fmts)
return AVERROR(EINVAL);
/* parse the list of formats */
for (cur = s->pix_fmts; cur; cur = sep ? sep + 1 : NULL) {
if (!(sep = strchr(cur, '|')))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment