Skip to content
Snippets Groups Projects
Commit d1afd3e1 authored by Vittorio Giovara's avatar Vittorio Giovara
Browse files

vf_format: check input validity

CC: libav-stable@libav.org
parent 7b48bf95
No related branches found
No related tags found
No related merge requests found
...@@ -59,6 +59,11 @@ static av_cold int init(AVFilterContext *ctx) ...@@ -59,6 +59,11 @@ static av_cold int init(AVFilterContext *ctx)
int nb_formats = 1; int nb_formats = 1;
int i; int i;
if (!s->pix_fmts) {
av_log(ctx, AV_LOG_ERROR, "Empty output format string.\n");
return AVERROR(EINVAL);
}
/* count the formats */ /* count the formats */
cur = s->pix_fmts; cur = s->pix_fmts;
while ((cur = strchr(cur, '|'))) { while ((cur = strchr(cur, '|'))) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment