summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-03-02 09:42:45 -0800
committerJames Dong <jdong@google.com>2011-03-02 12:26:14 -0800
commitc096a1308e4637ce75f993719cbe651ad90af40f (patch)
tree8db0073b18860853b0d1e48d9cee45ba06782eae /media
parent41440cf8cf275ada6d18b3bfa5dc9ca9fce77bca (diff)
downloadframeworks_base-c096a1308e4637ce75f993719cbe651ad90af40f.zip
frameworks_base-c096a1308e4637ce75f993719cbe651ad90af40f.tar.gz
frameworks_base-c096a1308e4637ce75f993719cbe651ad90af40f.tar.bz2
PV's mp3 decoder mistreated inputBufferCurrentLength in unit of bytes as in unit of bits
bug - 3464899 Change-Id: Idef81a1bd3846d60fc5e4a40c11ce1ba78ebaa23
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/codecs/mp3dec/src/pvmp3_decode_header.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/mp3dec/src/pvmp3_decode_header.cpp b/media/libstagefright/codecs/mp3dec/src/pvmp3_decode_header.cpp
index 8b0250a..d443b7c 100644
--- a/media/libstagefright/codecs/mp3dec/src/pvmp3_decode_header.cpp
+++ b/media/libstagefright/codecs/mp3dec/src/pvmp3_decode_header.cpp
@@ -121,9 +121,11 @@ ERROR_CODE pvmp3_decode_header(tmp3Bits *inputStream,
uint32 temp;
/*
- * Verify that at least the header is complete
+ * Verify that at least the header is complete
+ * Note that SYNC_WORD_LNGTH is in unit of bits, but inputBufferCurrentLength
+ * is in unit of bytes.
*/
- if (inputStream->inputBufferCurrentLength < (SYNC_WORD_LNGTH + 21))
+ if (inputStream->inputBufferCurrentLength < ((SYNC_WORD_LNGTH + 21) >> 3))
{
return NO_ENOUGH_MAIN_DATA_ERROR;
}