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

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

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

parents 6378937c 2dc73406
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]);