[vlc-devel] Re: Decoder.c memory leak patch

Gildas Bazin gbazin at altern.org
Thu Jul 29 11:01:04 CEST 2004


On Thursday 29 July 2004 09:19, Gildas Bazin wrote:
> 
> Thanks for investigating this.
> The patch below is a little less intrusive because it won't drop data 
blocks 
> when we have control over the reading pace (eg. transcoding to a file with 
> --no-minimize-threads).
> However it can't be applied like that either because the p_fifo->i_depth 
> check is not a reasonable one. Basically you only want to drop data blocks 
> when you notice that the fifo contains more than a predefined time amount 
> of data and not number of blocks. A block has an arbitrary size (could be 
a 
> few bytes to a few megabytes) so you can't really use that information.
> We'll need to use something cleverer, unfortunately when they reach this 
> level, the data blocks are not necessarily timestamped :(
> 

I just committed something which does the check on the size in bytes of the 
fifo. If it goes over 50 MB, then we empty the whole fifo (should make 
recovering more easy). It is of course not the best approach but should at 
least limit the memory growth while not breaking anything else.

--
Gildas

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list