diff options
author | Tom Ross <midgey@rockbox.org> | 2008-12-20 06:16:22 +0000 |
---|---|---|
committer | Tom Ross <midgey@rockbox.org> | 2008-12-20 06:16:22 +0000 |
commit | c3615119ba2e486006acbbe96875c6be0fb020df (patch) | |
tree | d8f6c1926ca309c6c4ac4acce929f0b8f8972141 | |
parent | 6a635b20daf6c5ce858873545476758bbb9c83f8 (diff) | |
download | rockbox-c3615119ba2e486006acbbe96875c6be0fb020df.tar.gz rockbox-c3615119ba2e486006acbbe96875c6be0fb020df.zip |
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
-rw-r--r-- | apps/codecs/libwma/wmadeci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c index 2697db0d8d..eb29b1284b 100644 --- a/apps/codecs/libwma/wmadeci.c +++ b/apps/codecs/libwma/wmadeci.c @@ -1542,7 +1542,7 @@ int wma_decode_superframe_frame(WMADecodeContext* s, } q = s->last_superframe + s->last_superframe_len; len = s->bit_offset; - while (len > 0) + while (len > 7) { *q++ = (get_bits)(&s->gb, 8); len -= 8; @@ -1597,7 +1597,7 @@ int wma_decode_superframe_frame(WMADecodeContext* s, len = buf_size - pos; 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; } s->last_superframe_len = len; |