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

Commit e7aba4ca 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

Change-Id: Ia1cd21978199447253de057599b26c8d187d31cf
parents a06a7750 464af3dc
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -936,6 +936,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;
@@ -1009,6 +1015,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;

@@ -1026,12 +1038,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;