lavfi: check av_strdup() return value

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 145a84717b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Paul B Mahol 2015-01-06 09:42:59 +00:00 committed by Michael Niedermayer
parent 0ce35b8ce8
commit c7a2ac6b6b
4 changed files with 8 additions and 0 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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);
}

View File

@ -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);