1
0
Fork 0
forked from len0rd/rockbox

Don't read a full byte if less than 8 bits are available. The change doesn't fix any problem samples, but the current code makes no sense. Also some spelling corrections in debugfs and comments.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19502 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Tom Ross 2008-12-20 06:16:22 +00:00
parent 6a635b20da
commit c3615119ba

View file

@ -1542,7 +1542,7 @@ int wma_decode_superframe_frame(WMADecodeContext* s,
} }
q = s->last_superframe + s->last_superframe_len; q = s->last_superframe + s->last_superframe_len;
len = s->bit_offset; len = s->bit_offset;
while (len > 0) while (len > 7)
{ {
*q++ = (get_bits)(&s->gb, 8); *q++ = (get_bits)(&s->gb, 8);
len -= 8; len -= 8;
@ -1597,7 +1597,7 @@ int wma_decode_superframe_frame(WMADecodeContext* s,
len = buf_size - pos; len = buf_size - pos;
if (len > MAX_CODED_SUPERFRAME_SIZE || len < 0) if (len > MAX_CODED_SUPERFRAME_SIZE || len < 0)
{ {
DEBUGF("superframe size too large error after decodeing\n"); DEBUGF("superframe size too large error after decoding\n");
goto fail; goto fail;
} }
s->last_superframe_len = len; s->last_superframe_len = len;