diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-08-25 09:36:22 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-08-25 09:36:22 +0200 |
commit | 1e7ce6d92513f0bf0037a0b7ebb96ffc7c0c7993 (patch) | |
tree | e5d55d75b435c6f4c07ff16c7de13180c95c1a99 /libavfilter | |
parent | 4b96fd2b1ec6975c369fcd44f20ef5ce9441394c (diff) | |
download | ffmpeg-1e7ce6d92513f0bf0037a0b7ebb96ffc7c0c7993.tar.gz |
avfilter/af_amix: check ff_insert_inpad() for failure
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_amix.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index 809c8bf9ca..78be57ac3f 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -483,7 +483,7 @@ fail: static av_cold int init(AVFilterContext *ctx) { MixContext *s = ctx->priv; - int i; + int i, ret; for (i = 0; i < s->nb_inputs; i++) { char name[32]; @@ -496,7 +496,10 @@ static av_cold int init(AVFilterContext *ctx) return AVERROR(ENOMEM); pad.filter_frame = filter_frame; - ff_insert_inpad(ctx, i, &pad); + if ((ret = ff_insert_inpad(ctx, i, &pad)) < 0) { + av_freep(&pad.name); + return ret; + } } s->fdsp = avpriv_float_dsp_alloc(0); |