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

Commit be0fe564 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Don't CHECK for missing metadata

Bug: 116109600
Test: CTS
Change-Id: Ibe4e091a30cf8d43d49e88caa6aef9110b8aac1b
parent f0941797
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -501,10 +501,15 @@ status_t VideoFrameDecoder::onOutputReceived(
        return ERROR_MALFORMED;
    }

    int32_t width, height, stride;
    CHECK(outputFormat->findInt32("width", &width));
    CHECK(outputFormat->findInt32("height", &height));
    CHECK(outputFormat->findInt32("stride", &stride));
    int32_t width, height, stride, srcFormat;
    if (!outputFormat->findInt32("width", &width) ||
            !outputFormat->findInt32("height", &height) ||
            !outputFormat->findInt32("stride", &stride) ||
            !outputFormat->findInt32("color-format", &srcFormat)) {
        ALOGE("format missing dimension or color: %s",
                outputFormat->debugString().c_str());
        return ERROR_MALFORMED;
    }

    int32_t crop_left, crop_top, crop_right, crop_bottom;
    if (!outputFormat->findRect("crop", &crop_left, &crop_top, &crop_right, &crop_bottom)) {
@@ -523,9 +528,6 @@ status_t VideoFrameDecoder::onOutputReceived(
    addFrame(frameMem);
    VideoFrame* frame = static_cast<VideoFrame*>(frameMem->pointer());

    int32_t srcFormat;
    CHECK(outputFormat->findInt32("color-format", &srcFormat));

    ColorConverter converter((OMX_COLOR_FORMATTYPE)srcFormat, dstFormat());

    uint32_t standard, range, transfer;