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

Commit dbaa9bc0 authored by Harish Mahendrakar's avatar Harish Mahendrakar Committed by Ray Essick
Browse files

C2SoftVpxDec: Replace CHECK() with error handling

CHECK() for color format has been replaced with appropriate error
handling.

Bug: 117625412
Bug: 152070124
Test: stagefright -s -S /sdcard/cformat.webm
Test: stagefright -s -S /sdcard/crowd_640x360p50f32_frmPar_1x1.webm
Change-Id: I1fe0be54f9910fd98ff4db9240b4dcfd09888ffb
Merged-In: I1fe0be54f9910fd98ff4db9240b4dcfd09888ffb
parent 3006a835
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -784,7 +784,13 @@ status_t C2SoftVpxDec::outputBuffer(
        }

    }
    CHECK(img->fmt == VPX_IMG_FMT_I420 || img->fmt == VPX_IMG_FMT_I42016);
    if(img->fmt != VPX_IMG_FMT_I420 && img->fmt != VPX_IMG_FMT_I42016) {
        ALOGE("img->fmt %d not supported", img->fmt);
        mSignalledError = true;
        work->workletsProcessed = 1u;
        work->result = C2_CORRUPTED;
        return false;
    }

    std::shared_ptr<C2GraphicBlock> block;
    uint32_t format = HAL_PIXEL_FORMAT_YV12;