Commit 9bd1bf38 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/f_interleave: check ff_insert_inpad() for failure

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent f39136b0
...@@ -110,7 +110,7 @@ static av_cold int init(AVFilterContext *ctx) ...@@ -110,7 +110,7 @@ static av_cold int init(AVFilterContext *ctx)
{ {
InterleaveContext *s = ctx->priv; InterleaveContext *s = ctx->priv;
const AVFilterPad *outpad = &ctx->filter->outputs[0]; const AVFilterPad *outpad = &ctx->filter->outputs[0];
int i; int i, ret;
s->queues = av_calloc(s->nb_inputs, sizeof(s->queues[0])); s->queues = av_calloc(s->nb_inputs, sizeof(s->queues[0]));
if (!s->queues) if (!s->queues)
...@@ -133,7 +133,10 @@ static av_cold int init(AVFilterContext *ctx) ...@@ -133,7 +133,10 @@ static av_cold int init(AVFilterContext *ctx)
default: default:
av_assert0(0); av_assert0(0);
} }
ff_insert_inpad(ctx, i, &inpad); if ((ret = ff_insert_inpad(ctx, i, &inpad)) < 0) {
av_freep(&inpad.name);
return ret;
}
} }
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment