[MPlayer-dev-eng] lavc xpm decoder memory problem

Drew Vogel dvogel at intercarve.net
Wed Jun 13 17:44:49 CEST 2007


I'm trying to write an XPM decoder for libavcodec to use with mencoder. 
What I have so far is attached. It properly decodes my XPM images (from 
vncrec), but it has a horrible memory leak that I can't find. Valgrind 
lets me know how much memory is leaked in it's summary report but it 
doesn't give me the file:line detail.

This particular patch uses avpicture_alloc/free because get_buffer was 
allocating too much memory, causing me to have to pad each line with 0's 
(which strangely did not make it into the output video). The memory leak 
occurs with both avpicture_alloc/free and get_buffer/release_buffer.

Could someone point me in the right direction?

Thanks,
Drew P. Vogel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libavcodec.xpm.20070613.diff
Type: text/x-diff
Size: 5421 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070613/85a94f76/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer.xpm.20070613.diff
Type: text/x-diff
Size: 2660 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070613/85a94f76/attachment-0001.diff>


More information about the MPlayer-dev-eng mailing list