Skip to content
Snippets Groups Projects
Commit 145a8471 authored by Paul B Mahol's avatar Paul B Mahol
Browse files

lavfi: check av_strdup() return value


Signed-off-by: default avatarPaul B Mahol <onemda@gmail.com>
parent 3ebd76a9
No related branches found
No related tags found
No related merge requests found
......@@ -496,6 +496,8 @@ static av_cold int init(AVFilterContext *ctx)
snprintf(name, sizeof(name), "input%d", i);
pad.type = AVMEDIA_TYPE_AUDIO;
pad.name = av_strdup(name);
if (!pad.name)
return AVERROR(ENOMEM);
pad.filter_frame = filter_frame;
ff_insert_inpad(ctx, i, &pad);
......
......@@ -214,6 +214,8 @@ static av_cold int join_init(AVFilterContext *ctx)
snprintf(name, sizeof(name), "input%d", i);
pad.type = AVMEDIA_TYPE_AUDIO;
pad.name = av_strdup(name);
if (!pad.name)
return AVERROR(ENOMEM);
pad.filter_frame = filter_frame;
pad.needs_fifo = 1;
......
......@@ -52,6 +52,8 @@ static av_cold int split_init(AVFilterContext *ctx)
snprintf(name, sizeof(name), "output%d", i);
pad.type = ctx->filter->inputs[0].type;
pad.name = av_strdup(name);
if (!pad.name)
return AVERROR(ENOMEM);
ff_insert_outpad(ctx, i, &pad);
}
......
......@@ -289,6 +289,8 @@ static av_cold int movie_common_init(AVFilterContext *ctx)
snprintf(name, sizeof(name), "out%d", i);
pad.type = movie->st[i].st->codec->codec_type;
pad.name = av_strdup(name);
if (!pad.name)
return AVERROR(ENOMEM);
pad.config_props = movie_config_output_props;
pad.request_frame = movie_request_frame;
ff_insert_outpad(ctx, i, &pad);
......
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