[x264-devel] Possible memory leak in macroblock_cache

Steven Tondeur stondeur at etro.vub.ac.be
Wed Jun 7 17:34:37 CEST 2006


Hi,

I found a small inconsistency between initializing and ending the 
macrblock cache.

cache_init : int i_refs = (i ? 1 : h->param.i_frame_reference) + 
h->param.b_bframe_pyramid;
cache_end  : int i_refs = i ? 1 + h->param.b_bframe_pyramid : 
h->param.i_frame_reference;

If i is 0, this would amount in allocating (i_frame_reference + 
b_bframe_pyramid) entries and freeing (i_frame_reference) entries.

I'm not sure which one is the right expression, but I made a patch which 
changes the i_ref from 'cache_end' to the one from 'cache_init'.

Steven



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mbcache_end.diff
Url: http://mailman.videolan.org/pipermail/x264-devel/attachments/20060607/6f9e9594/attachment.txt 


More information about the x264-devel mailing list