[x264-devel] Delete the huge memory leak in x264.

Yohann Pitrey Helpiquet yohann.pitrey at ens.insa-rennes.fr
Mon Nov 26 11:28:49 CET 2007


Hi,

 From what i saw, this memory leak seems to occur only when you use threads. Is 
that right? I don't use threads anymore (i erased thread stuff from the code), 
do you believe it's worth the time to merge modifications from your patch?

Thanks a lot!

Yohann.



alexander tian a écrit :
> Hi, everyone
> 
> I found huge memory leak in the x264. There are at least 3 positions 
> which has memory leak. Such as below:
> 
> 1. The function "x264_mb_analyse_load_costs" in file " analyse.c". Here 
> only "malloc" the buffer for the parameter "*p_cost_mv[52]". But not 
> free them in the end. It should be freed at the function 
> "x264_encoder_close".
> 
> 2. The parameter "i_refs" in the function "x264_macroblock_cache_end" 
> should be computed like in the "x264_macroblock_cache_init". Otherwise 
> it will cause memory leak.
> 
> 3. Not all the new "x264_frame_t" are deleted at the end of encoding. So 
> it cause huge memory leak.
> 
> I have corrected them. But I am unable to write patch file. So I had to 
> put my changed project for windows. My way is not the best. Somebody can 
> reference from it to generate the better way. Please put in your patch 
> file if you have better ideas.
> 
> Thank you very much.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> http://mailman.videolan.org/listinfo/x264-devel





More information about the x264-devel mailing list