Browse Source

avfilter/af_merge: check ff_insert_inpad() for failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n3.4
Paul B Mahol 8 years ago
parent
commit
f39136b0a7
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      libavfilter/af_amerge.c

+ 5
- 2
libavfilter/af_amerge.c View File

@@ -322,7 +322,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
static av_cold int init(AVFilterContext *ctx) static av_cold int init(AVFilterContext *ctx)
{ {
AMergeContext *s = ctx->priv; AMergeContext *s = ctx->priv;
int i;
int i, ret;


s->in = av_calloc(s->nb_inputs, sizeof(*s->in)); s->in = av_calloc(s->nb_inputs, sizeof(*s->in));
if (!s->in) if (!s->in)
@@ -336,7 +336,10 @@ static av_cold int init(AVFilterContext *ctx)
}; };
if (!name) if (!name)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
ff_insert_inpad(ctx, i, &pad);
if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) {
av_freep(&pad.name);
return ret;
}
} }
return 0; return 0;
} }


Loading…
Cancel
Save