Rockbox mail archive
Subject: Re: CODEC_SIZE too small for the iriver simulator
Re: CODEC_SIZE too small for the iriver simulator
Here's a fix to at least avoid crashing rockbox:
Index: apps/codecs.c
===================================================================
RCS file: /cvsroot/rockbox/apps/codecs.c,v
retrieving revision 1.11
diff -u -3 -p -r1.11 codecs.c
--- apps/codecs.c 12 Jul 2005 16:45:38 -0000 1.11
+++ apps/codecs.c 26 Jul 2005 13:31:59 -0000
@@ -304,7 +304,8 @@ int codec_load_file(const char *plugin)
rc = read(fd, &codecbuf[0], CODEC_SIZE);
close(fd);
- if (rc <= 0) {
+ /* if rc == CODEC_SIZE, then the codec is probably larger */
+ if (rc <= 0 || rc == CODEC_SIZE) {
logf("Codec read error");
return CODEC_ERROR;
}
Moreover, every config-h*.h should have something like that to allow loading
codecs in the simulator:
/* The number of bytes reserved for loadable codecs */
#ifdef SIMULATOR
#define CODEC_SIZE 0x80000
#else
#define CODEC_SIZE 0x40000
#endif
Frederic Devernay wrote:
> Hi,
> CODEC_SIZE is 256k on the iriver, but on the simulator, because of the
> debugging symbols, the flac and vorbis codecs are larger:
> 281489 Jul 26 12:24 flac.codec
> 299028 Jul 26 12:46 vorbis.codec
>
> should we raise CODEC_SIZE, maybe only on the simulator?
> Fred
>
> _______________________________________________
> http://cool.haxx.se/mailman/listinfo/rockbox
>
>
_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox
Received on Tue Jul 26 16:40:18 2005
Page was last modified "Jan 10 2012" The Rockbox Crew
|