diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2013-02-21 20:15:08 +0100 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2013-02-24 11:23:51 +0100 |
commit | bf0712c2f8efe9731ff354870e57653badc07ef6 (patch) | |
tree | aef388bee00d7f77e67979370e69479371cd96af /libavfilter | |
parent | 066739f6bc628188bdbbd2695196acfd16ec79e1 (diff) | |
download | ffmpeg-bf0712c2f8efe9731ff354870e57653badc07ef6.tar.gz |
libavfilter/af_amerge: fix segfault if init fails.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_amerge.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c index 357cbbe9d5..2d68ea6126 100644 --- a/libavfilter/af_amerge.c +++ b/libavfilter/af_amerge.c @@ -63,8 +63,10 @@ static av_cold void uninit(AVFilterContext *ctx) int i; for (i = 0; i < am->nb_inputs; i++) { - ff_bufqueue_discard_all(&am->in[i].queue); - av_freep(&ctx->input_pads[i].name); + if (am->in) + ff_bufqueue_discard_all(&am->in[i].queue); + if (ctx->input_pads) + av_freep(&ctx->input_pads[i].name); } av_freep(&am->in); } |