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

Commit 695a42fa authored by Dongwon Kang's avatar Dongwon Kang Committed by android-build-merger
Browse files

Merge "Skip track if verification fails" into mnc-dev am: 6168d8eb am:...

Merge "Skip track if verification fails" into mnc-dev am: 6168d8eb am: 1e3070e5 am: 3b8c1df6 am: 5b6106b0 am: 995ffd91 am: 464af3dc am: e7aba4ca am: 962ea2d2 am: 852e9026
am: 3a8976ce

Change-Id: I0691eaeb4f305dda210861b38ed1355964d9346d
parents 6060c914 3a8976ce
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -941,6 +941,12 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
                ALOGE("moov: depth %d", depth);
                return ERROR_MALFORMED;
            }

            if (chunk_type == FOURCC('m', 'o', 'o', 'v') && mInitCheck == OK) {
                ALOGE("duplicate moov");
                return ERROR_MALFORMED;
            }

            if (chunk_type == FOURCC('m', 'o', 'o', 'f') && !mMoofFound) {
                // store the offset of the first segment
                mMoofFound = true;
@@ -1014,6 +1020,12 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
                if (!mLastTrack->meta->findInt32(kKeyTrackID, &trackId)) {
                    mLastTrack->skipTrack = true;
                }

                status_t err = verifyTrack(mLastTrack);
                if (err != OK) {
                    mLastTrack->skipTrack = true;
                }

                if (mLastTrack->skipTrack) {
                    Track *cur = mFirstTrack;

@@ -1033,12 +1045,6 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {

                    return OK;
                }

                status_t err = verifyTrack(mLastTrack);

                if (err != OK) {
                    return err;
                }
            } else if (chunk_type == FOURCC('m', 'o', 'o', 'v')) {
                mInitCheck = OK;