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

Commit 41bbc3c7 authored by guochuang's avatar guochuang Committed by Chuang Guo
Browse files

Nuplayer: remove CHECKs in updateVideoSize



Bug: 388723642
Test: MediaPlayerTest
Change-Id: I2d6468c1b7806e8ef073f7dc6b02f6589421d873
Signed-off-by: default avatarguochuang <guochuang@xiaomi.corp-partner.google.com>
parent 32325124
Loading
Loading
Loading
Loading
+14 −15
Original line number Diff line number Diff line
@@ -2079,14 +2079,12 @@ void NuPlayer::updateVideoSize(

    int32_t displayWidth, displayHeight;
    if (outputFormat != NULL) {
        int32_t width, height;
        CHECK(outputFormat->findInt32("width", &width));
        CHECK(outputFormat->findInt32("height", &height));

        int32_t cropLeft, cropTop, cropRight, cropBottom;
        CHECK(outputFormat->findRect(
        int32_t width, height, cropLeft, cropTop, cropRight, cropBottom;
        if (outputFormat->findInt32("width", &width)
                && outputFormat->findInt32("height", &height)
                && outputFormat->findRect(
                    "crop",
                    &cropLeft, &cropTop, &cropRight, &cropBottom));
                    &cropLeft, &cropTop, &cropRight, &cropBottom)) {

            displayWidth = cropRight - cropLeft + 1;
            displayHeight = cropBottom - cropTop + 1;
@@ -2097,6 +2095,7 @@ void NuPlayer::updateVideoSize(
                displayWidth,
                displayHeight,
                cropLeft, cropTop);
        }
    } else {
        if (!inputFormat->findInt32("width", &displayWidth)
            || !inputFormat->findInt32("height", &displayHeight)) {