[FFmpeg-devel] [PATCH 1/3] libavfilter/af_amerge: fix segfault if init fails.

Nicolas George nicolas.george at normalesup.org
Thu Feb 21 20:44:13 CET 2013


Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
 libavfilter/af_amerge.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c
index 357cbbe..85ae8d4 100644
--- a/libavfilter/af_amerge.c
+++ b/libavfilter/af_amerge.c
@@ -63,7 +63,8 @@ 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);
+        if (am->in)
+            ff_bufqueue_discard_all(&am->in[i].queue);
         av_freep(&ctx->input_pads[i].name);
     }
     av_freep(&am->in);
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list