mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avfilter/vf_format: check that the format list is not empty
Fixes Ticket3210 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b53d6ce3fd
commit
ee16e0cacc
@ -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, '|')))
|
||||
|
Loading…
Reference in New Issue
Block a user