[FFmpeg-cvslog] libavfilter/af_amerge: fix segfault if init fails.
Nicolas George
git at videolan.org
Sun Feb 24 11:28:27 CET 2013
ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Thu Feb 21 20:15:08 2013 +0100| [bf0712c2f8efe9731ff354870e57653badc07ef6] | committer: Nicolas George
libavfilter/af_amerge: fix segfault if init fails.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bf0712c2f8efe9731ff354870e57653badc07ef6
---
libavfilter/af_amerge.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c
index 357cbbe..2d68ea6 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);
}
More information about the ffmpeg-cvslog
mailing list