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

Commit 9054d47d authored by Wonsik Kim's avatar Wonsik Kim Committed by android-build-merger
Browse files

Merge "C2SoftAvcEnc: don't crash at unexpected input" into pi-dev

am: b6b34955

Change-Id: I584459c25843b8824c8a86427137b49ba4c97f4a
parents 24053f89 b6b34955
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -909,6 +909,9 @@ c2_status_t C2SoftAvcEnc::setEncodeArgs(
    }

    ALOGV("width = %d, height = %d", input->width(), input->height());
    if (mWidth != input->width() || mHeight != input->height()) {
        return C2_BAD_VALUE;
    }
    const C2PlanarLayout &layout = input->layout();
    uint8_t *yPlane = const_cast<uint8_t *>(input->data()[C2PlanarLayout::PLANE_Y]);
    uint8_t *uPlane = const_cast<uint8_t *>(input->data()[C2PlanarLayout::PLANE_U]);