diff options
| author | John Grossman <johngro@google.com> | 2012-09-07 13:43:26 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-09-07 13:43:26 -0700 |
| commit | e356780df8379d875d1e549eca8daa1a5e399f03 (patch) | |
| tree | c24fb64db057f8500ec480058db119988e6b0e7a | |
| parent | 97614a228f3826c3772d1b7c7b2ea32576e341fb (diff) | |
| parent | 1adbb8c35b721e1a29f8e2e2a5341ae0b1f067ba (diff) | |
| download | frameworks_av-e356780df8379d875d1e549eca8daa1a5e399f03.zip frameworks_av-e356780df8379d875d1e549eca8daa1a5e399f03.tar.gz frameworks_av-e356780df8379d875d1e549eca8daa1a5e399f03.tar.bz2 | |
am 1adbb8c3: Merge "Fix iTunSMPB parsing for AAC tracks encoded with Nero" into jb-mr1-dev
* commit '1adbb8c35b721e1a29f8e2e2a5341ae0b1f067ba':
Fix iTunSMPB parsing for AAC tracks encoded with Nero
| -rw-r--r-- | media/libstagefright/MPEG4Extractor.cpp | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp index 7d49ef0..dc8e4a3 100644 --- a/media/libstagefright/MPEG4Extractor.cpp +++ b/media/libstagefright/MPEG4Extractor.cpp @@ -1665,15 +1665,26 @@ status_t MPEG4Extractor::parseMetaData(off64_t offset, size_t size) { mLastCommentData.setTo((const char *)buffer + 8); break; } - if (mLastCommentMean == "com.apple.iTunes" - && mLastCommentName == "iTunSMPB" - && mLastCommentData.length() != 0) { - int32_t delay, padding; - if (sscanf(mLastCommentData, - " %*x %x %x %*x", &delay, &padding) == 2) { - mLastTrack->meta->setInt32(kKeyEncoderDelay, delay); - mLastTrack->meta->setInt32(kKeyEncoderPadding, padding); + + // Once we have a set of mean/name/data info, go ahead and process + // it to see if its something we are interested in. Whether or not + // were are interested in the specific tag, make sure to clear out + // the set so we can be ready to process another tuple should one + // show up later in the file. + if ((mLastCommentMean.length() != 0) && + (mLastCommentName.length() != 0) && + (mLastCommentData.length() != 0)) { + + if (mLastCommentMean == "com.apple.iTunes" + && mLastCommentName == "iTunSMPB") { + int32_t delay, padding; + if (sscanf(mLastCommentData, + " %*x %x %x %*x", &delay, &padding) == 2) { + mLastTrack->meta->setInt32(kKeyEncoderDelay, delay); + mLastTrack->meta->setInt32(kKeyEncoderPadding, padding); + } } + mLastCommentMean.clear(); mLastCommentName.clear(); mLastCommentData.clear(); |
