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

Commit 3c6fac2c authored by Lajos Molnar's avatar Lajos Molnar Committed by Android (Google) Code Review
Browse files

Merge "stagefright: propagate error in MPEG4Extractor::readMetaData" into lmp-dev

parents a2e14302 4ff2a0db
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -489,7 +489,9 @@ status_t MPEG4Extractor::readMetaData() {
        off64_t orig_offset = offset;
        err = parseChunk(&offset, 0);

        if (offset <= orig_offset) {
        if (err != OK && err != UNKNOWN_ERROR) {
            break;
        } else if (offset <= orig_offset) {
            // only continue parsing if the offset was advanced,
            // otherwise we might end up in an infinite loop
            ALOGE("did not advance: 0x%lld->0x%lld", orig_offset, offset);
@@ -497,9 +499,8 @@ status_t MPEG4Extractor::readMetaData() {
            break;
        } else if (err == OK) {
            continue;
        } else if (err != UNKNOWN_ERROR) {
            break;
        }

        uint32_t hdr[2];
        if (mDataSource->readAt(offset, hdr, 8) < 8) {
            break;