[libav-devel] [PATCH 3/8] lavfi: avfilter_merge_formats: handle case where inputs are same

Diego Biurrun diego at biurrun.de
Sun May 6 13:47:00 CEST 2012


On Sun, May 06, 2012 at 10:24:17AM +0200, Anton Khirnov wrote:
> --- a/libavfilter/formats.c
> +++ b/libavfilter/formats.c
> @@ -45,6 +45,8 @@ AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b)
>      AVFilterFormats *ret;
>      unsigned i, j, k = 0, m_count;
>  
> +    if (a == b) return a;

Please break the line.

>      ret = av_mallocz(sizeof(AVFilterFormats));

One of three unchecked mallocs in that function alone ...

Diego


More information about the libav-devel mailing list