[FFmpeg-devel] [PATCH] lavfi: implement avfilter_get_audio_buffer_ref_from_arrays()

Aurelien Jacobs aurel at gnuage.org
Mon Jun 13 19:17:56 CEST 2011


On Fri, Jun 10, 2011 at 01:35:11AM +0200, Stefano Sabatini wrote:
> On date Thursday 2011-06-09 20:17:55 +0200, Michael Niedermayer encoded:
> > On Thu, Jun 09, 2011 at 10:37:41AM +0200, Stefano Sabatini wrote:
> > [...]
> > and someof the if() seem unneeded
> 
> Indeed.

...

> From bd016e627d03677f34d15e2d5243f1526d51e461 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> Date: Mon, 31 Jan 2011 00:07:41 +0100
> Subject: [PATCH] lavfi: implement avfilter_get_audio_buffer_ref_from_arrays()
> 
> ---
>  libavfilter/avfilter.c |   42 ++++++++++++++++++++++++++++++++++++++++++
>  libavfilter/avfilter.h |   18 ++++++++++++++++++
>  2 files changed, 60 insertions(+), 0 deletions(-)
> 
> diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
> index 6d55350..3b2e3ca 100644
> --- a/libavfilter/avfilter.c
> +++ b/libavfilter/avfilter.c
> @@ -421,6 +421,48 @@ AVFilterBufferRef *avfilter_get_audio_buffer(AVFilterLink *link, int perms,
> [...]
> +fail:
> +    if (samplesref && samplesref->audio)

Checking samplesref->audio is also not necessary...

> +        av_freep(&samplesref->audio);
> +    av_freep(&samplesref);
> +    av_freep(&samples);
> +    return NULL;
> +}

Aurel


More information about the ffmpeg-devel mailing list