diff options
author | Magnus Holmgren <magnushol@gmail.com> | 2006-10-10 19:22:40 +0000 |
---|---|---|
committer | Magnus Holmgren <magnushol@gmail.com> | 2006-10-10 19:22:40 +0000 |
commit | 38168222ae965438704968a106cb08e6ab069145 (patch) | |
tree | f342398d0c03d28a003c8acee402bb955ab9f876 /apps/codecs/libfaad | |
parent | 02d756dfd4f0ca89fcf31a0c8b1ce86c739a5b2e (diff) |
AAC codec: Fix buffer overrun on high-bitrate files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11179 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libfaad')
-rw-r--r-- | apps/codecs/libfaad/bits.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/codecs/libfaad/bits.c b/apps/codecs/libfaad/bits.c index 65f451a8cb..a010e830ed 100644 --- a/apps/codecs/libfaad/bits.c +++ b/apps/codecs/libfaad/bits.c @@ -32,7 +32,10 @@ #include <string.h> #include "bits.h" -uint8_t static_buffer[1024]; +/* Need to be large enough to fit the largest compressed sample in a file. + * Samples a little larger than 1 KB observed in a 256 kbps file. + */ +uint8_t static_buffer[2048]; /* initialize buffer, call once before first getbits or showbits */ void faad_initbits(bitfile *ld, const void *_buffer, const uint32_t buffer_size) @@ -75,6 +78,7 @@ void faad_initbits(bitfile *ld, const void *_buffer, const uint32_t buffer_size) void faad_endbits(bitfile *ld) { +#if 0 if (ld) { if (ld->buffer) @@ -83,6 +87,9 @@ void faad_endbits(bitfile *ld) ld->buffer = NULL; } } +#else + (void) ld; +#endif } uint32_t faad_get_processed_bits(bitfile *ld) |