[Tremor] [Patch] Fix crash on large comments on low memory targets

Andy Grundman andy at slimdevices.com
Fri Jul 3 04:37:38 PDT 2009


On Jul 3, 2009, at 12:16 AM, Mike Giacomelli wrote:

> In rockbox this has not been an issue, since we run on mostly hard  
> disk based players, and can only read the disk for a few seconds  
> during each buffering period.  Therefore we buffer ahead however  
> many MB of RAM we have in our system and decode until we run out of  
> buffer.  Ogg files are then read out of our own buffering system and  
> decoded by Tremor after the disk has already spun down.  If you make  
> the codec not request bytes it doesnt need it makes little  
> difference, since we have already loaded the memory and powered down  
> our disk or flash memory.

I would still suggest testing with some very large cover art to make  
sure it works.

> My goal was to make the decoder not crash on files that exhausted  
> our tiny malloc buffer.  But if you've got a fix that does this and  
> helps people who haven't written their own buffering code, that  
> would be nice too.  Why hasn't it been committed?

It's a hack that doesn't really belong in the real code base.  I  
believe Monty was going to try and properly add a way to do this to  
the API.



More information about the Tremor mailing list