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

Commit 4b7f683c authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge changes I7816230a,I7d27c737,Idb899132

* changes:
  Cannot play mov file with samr box
  Cannot play mp4 file whose sawb box has sub box stts
  Return first data packet when seek to begin
parents 9fbd2701 c87073d6
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -1635,9 +1635,8 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
        case FOURCC(".mp3"):
        case 0x6D730055: // "ms U" mp3 audio
        {
            if (mIsQT && chunk_type == FOURCC("mp4a")
                    && depth >= 1 && mPath[depth - 1] == FOURCC("wave")) {
                // Ignore mp4a embedded in QT wave atom
            if (mIsQT && depth >= 1 && mPath[depth - 1] == FOURCC("wave")) {
                // Ignore all atoms embedded in QT wave atom
                *offset += chunk_size;
                break;
            }
@@ -1666,7 +1665,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
            off64_t stop_offset = *offset + chunk_size;
            *offset = data_offset + sizeof(buffer);

            if (mIsQT && chunk_type == FOURCC("mp4a")) {
            if (mIsQT) {
                if (version == 1) {
                    if (mDataSource->readAt(*offset, buffer, 16) < 16) {
                        return ERROR_IO;
@@ -1995,6 +1994,13 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {

            *offset += chunk_size;

            if (depth >= 1 && mPath[depth - 1] != FOURCC("stbl")) {
                char chunk[5];
                MakeFourCCString(mPath[depth - 1], chunk);
                ALOGW("stts's parent box (%s) is not stbl, skip it.", chunk);
                break;
            }

            status_t err =
                mLastTrack->sampleTable->setTimeToSampleParams(
                        data_offset, chunk_data_size);
+1 −1
Original line number Diff line number Diff line
@@ -983,7 +983,7 @@ void MyOggExtractor::buildTableOfContents() {
        size_t denom = numerator - kMaxNumTOCEntries;

        size_t accum = 0;
        for (ssize_t i = mTableOfContents.size() - 1; i >= 0; --i) {
        for (ssize_t i = mTableOfContents.size(); i > 0; --i) {
            accum += denom;
            if (accum >= numerator) {
                mTableOfContents.removeAt(i);