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

Commit 995ffd91 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: 1e3070e5 am: 3b8c1df6

am: 5b6106b0

Change-Id: I4dbc87895ab8bb7ac44c8f8a1c82efeee73786d1
parents 8486817a 5b6106b0
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -931,6 +931,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;
@@ -1004,6 +1010,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;

@@ -1021,12 +1033,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;