Browse Source

lavfi: check av_strdup() return value

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n2.6
Paul B Mahol 10 years ago
parent
commit
145a84717b
4 changed files with 8 additions and 0 deletions
  1. +2
    -0
      libavfilter/af_amix.c
  2. +2
    -0
      libavfilter/af_join.c
  3. +2
    -0
      libavfilter/split.c
  4. +2
    -0
      libavfilter/src_movie.c

+ 2
- 0
libavfilter/af_amix.c 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);


+ 2
- 0
libavfilter/af_join.c 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;


+ 2
- 0
libavfilter/split.c 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);
}


+ 2
- 0
libavfilter/src_movie.c 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);


Loading…
Cancel
Save