OSDN Git Service

Check the syncword for each frame.
authorGloria Wang <gwang@google.com>
Wed, 3 Aug 2011 22:06:35 +0000 (15:06 -0700)
committerGloria Wang <gwang@google.com>
Wed, 3 Aug 2011 22:06:35 +0000 (15:06 -0700)
Fix for bug 5117233.

Change-Id: I714c9b671832c9606cabdfe6bb21697c08de2eff

media/libstagefright/AACExtractor.cpp

index 4203b6e..a5a6b64 100644 (file)
@@ -92,7 +92,7 @@ static size_t getFrameSize(const sp<DataSource> &source, off64_t offset) {
     size_t frameSize = 0;
 
     uint8_t syncword[2];
-    if (source->readAt(0, &syncword, 2) != 2) {
+    if (source->readAt(offset, &syncword, 2) != 2) {
         return 0;
     }
     if ((syncword[0] != 0xff) || ((syncword[1] & 0xf6) != 0xf0)) {