diff options
author | James Dong <jdong@google.com> | 2011-03-02 09:42:45 -0800 |
---|---|---|
committer | James Dong <jdong@google.com> | 2011-03-02 12:26:14 -0800 |
commit | ebdc652a891659d83386c3f92715ad6c70c8ba2d (patch) | |
tree | 6aa8964f4c963e717a00d65afceedb6d12a68f2c /media/libstagefright | |
parent | 5f5354e35ab3b2a0cb4cabb6d0aa5a160225ccc8 (diff) | |
download | frameworks_av-ebdc652a891659d83386c3f92715ad6c70c8ba2d.zip frameworks_av-ebdc652a891659d83386c3f92715ad6c70c8ba2d.tar.gz frameworks_av-ebdc652a891659d83386c3f92715ad6c70c8ba2d.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/libstagefright')
-rw-r--r-- | media/libstagefright/codecs/mp3dec/src/pvmp3_decode_header.cpp | 6 |
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; } |