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

Commit 77da9308 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7796451 from 3ee18195 to sc-qpr1-release

Change-Id: Id703e1abd048f1302c906d8a89fe285072564480
parents 5c41b612 3ee18195
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -406,7 +406,7 @@ void C2SoftMP3::process(
        mConfig->inputBufferCurrentLength = (inSize - inPos);
        mConfig->inputBufferMaxLength = 0;
        mConfig->inputBufferUsedLength = 0;
        mConfig->outputFrameSize = (calOutSize - outSize);
        mConfig->outputFrameSize = (calOutSize - outSize) / sizeof(int16_t);
        mConfig->pOutputBuffer = reinterpret_cast<int16_t *> (wView.data() + outSize);

        ERROR_CODE decoderErr;
+9 −8
Original line number Diff line number Diff line
@@ -610,18 +610,19 @@ OSCL_EXPORT_REF Bool PVInitVideoEncoder(VideoEncControls *encoderControl, Vid
    /* Find the maximum width*height for memory allocation of the VOPs */
    for (idx = 0; idx < nLayers; idx++)
    {
        temp_w = video->encParams->LayerWidth[idx];
        temp_h = video->encParams->LayerHeight[idx];
        temp_w = ((video->encParams->LayerWidth[idx] + 15) >> 4) << 4;
        temp_h = ((video->encParams->LayerHeight[idx] + 15) >> 4) << 4;

        if (temp_w > 2048 || temp_h > 2048) {
            goto CLEAN_UP;
        }

        if ((temp_w*temp_h) > max)
        {
            max = temp_w * temp_h;
            max_width = ((temp_w + 15) >> 4) << 4;
            max_height = ((temp_h + 15) >> 4) << 4;
            if (((uint64_t)max_width * max_height) > (uint64_t)INT32_MAX
                    || temp_w > INT32_MAX - 15 || temp_h > INT32_MAX - 15) {
                goto CLEAN_UP;
            }
            max_width = temp_w;
            max_height = temp_h;

            nTotalMB = ((max_width * max_height) >> 8);
        }