<span class="gmail_quote"></span>Hi, everyone<br><br>I found huge memory leak in the x264. There are at least 3 positions which has memory leak. Such as below:<br><br>1. The function &quot;x264_mb_analyse_load_costs&quot; in file &quot;
analyse.c&quot;. Here only &quot;malloc&quot; the buffer for the parameter &quot;*p_cost_mv[52]&quot;. But not free them in the end. It should be freed at the function &quot;x264_encoder_close&quot;.
<br><br>2. The parameter &quot;i_refs&quot; in the function &quot;x264_macroblock_cache_end&quot; should be computed like in the &quot;x264_macroblock_cache_init&quot;. Otherwise it will cause memory leak.<br><br>3. Not all the new &quot;x264_frame_t&quot; are deleted at the end of encoding. So it cause huge memory leak.
<br><br>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.
<br><br>Thank you very much.<br><br>
<br clear="all">