Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1adbb8c3 authored by John Grossman's avatar John Grossman Committed by Android (Google) Code Review
Browse files

Merge "Fix iTunSMPB parsing for AAC tracks encoded with Nero" into jb-mr1-dev

parents 1c7ff022 8c7d147c
Loading
Loading
Loading
Loading
+19 −8
Original line number Diff line number Diff line
@@ -1665,15 +1665,26 @@ status_t MPEG4Extractor::parseMetaData(off64_t offset, size_t size) {
                    mLastCommentData.setTo((const char *)buffer + 8);
                    break;
            }

            // 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"
                    && mLastCommentData.length() != 0) {
                        && 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();