summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-03-02 14:00:56 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-03-02 14:00:56 -0800
commitf96ebc66c0feb441733da6d08bca6d8de96cd9f0 (patch)
treec8f968cc41015354621c2344fd9c79ba7978aa4b /media
parent3fd91baee812919f53a85c5c05f32606313f8334 (diff)
parentebdc652a891659d83386c3f92715ad6c70c8ba2d (diff)
downloadframeworks_av-f96ebc66c0feb441733da6d08bca6d8de96cd9f0.zip
frameworks_av-f96ebc66c0feb441733da6d08bca6d8de96cd9f0.tar.gz
frameworks_av-f96ebc66c0feb441733da6d08bca6d8de96cd9f0.tar.bz2
Merge "PV's mp3 decoder mistreated inputBufferCurrentLength in unit of bytes as in unit of bits"
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;
}