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

Stefano Sabatini stefasab at gmail.com
Fri Feb 22 18:27:21 CET 2013


On date Thursday 2013-02-21 20:44:13 +0100, Nicolas George encoded:
> 
> 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);

LGTM, thanks.
-- 
FFmpeg = Fundamentalist and Funny Mortal Peaceful Enhanced Gadget


More information about the ffmpeg-devel mailing list