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

Commit 3085dbc1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "heif: allow files without valid image sequence track to extract"

parents 2eff8dbb af1da856
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -602,6 +602,14 @@ status_t MPEG4Extractor::readMetaData() {
                ALOGE("heif image %u has no meta!", imageIndex);
                continue;
            }
            // Some heif files advertise image sequence brands (eg. 'hevc') in
            // ftyp box, but don't have any valid tracks in them. Instead of
            // reporting the entire file as malformed, we override the error
            // to allow still images to be extracted.
            if (err != OK) {
                ALOGW("Extracting still images only");
                err = OK;
            }

            ALOGV("adding HEIF image track %u", imageIndex);
            Track *track = new Track;
+1 −1
Original line number Diff line number Diff line
@@ -667,7 +667,7 @@ status_t convertMetaDataToMessage(
        if (!strncasecmp("image/", mime, 6)) {
            int32_t gridWidth, gridHeight, gridRows, gridCols;
            if (meta->findInt32(kKeyGridWidth, &gridWidth)
                    && meta->findInt32(kKeyHeight, &gridHeight)
                    && meta->findInt32(kKeyGridHeight, &gridHeight)
                    && meta->findInt32(kKeyGridRows, &gridRows)
                    && meta->findInt32(kKeyGridCols, &gridCols)) {
                msg->setInt32("grid-width", gridWidth);