Re: png2yuv memory leak and fix

Bernhard Praschinger <[email protected]> Tue, 19 May 2009 18:18:05 +0200
Newsgroups gmane.comp.video.mjpeg.devel
Message-ID <[email protected]>
Hallo

[email protected] wrote:
> A simple fix, the png library needs to free memory after every read of a
> png image.
> 
> --- lavtools/png2yuv.c.orig     Fri May 15 03:23:58 2009
> +++ lavtools/png2yuv.c  Fri May 15 03:24:44 2009
> @@ -407,6 +407,7 @@ int decode_png(const char *pngname, int process, param
>      return 2;
>      }
> 
> +  png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
>    fclose(pngfile);
> 
>    return 1;
> 
> 
> Otherwise it craps out after a few hundred (or fewer, depending on image
> complexity) images.
You have posted that a few day's ago.
Steven M. Schultz wrote to the list that he checked in you fix.
It is aviable in the current CVS.


auf hoffentlich bald,

Berni the Chaos of Woodquarter

Email: [email protected]
www: http://www.lysator.liu.se/~gz/bernhard

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects