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

Commit 222dca47 authored by Marco Nelissen's avatar Marco Nelissen Committed by android-build-merger
Browse files

Merge "Skip track if verification fails" into klp-dev am: ab2c5046 am: f2334151

am: 87f1a304

Change-Id: I8fc2acbf9bbddbc4a401f51595752351c06acc79
parents 6b401a33 87f1a304
Loading
Loading
Loading
Loading
+12 −6
Original line number Diff line number Diff line
@@ -891,6 +891,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('s', 't', 'b', 'l')) {
                ALOGV("sampleTable chunk is %" PRIu64 " bytes long.", chunk_size);

@@ -958,6 +964,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;

@@ -975,12 +987,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;