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

Commit 17ec7d74 authored by Marco Nelissen's avatar Marco Nelissen Committed by android-build-merger
Browse files

Merge "Add VPX output buffer size check" into mnc-dev am: 68a43d37 am: 562cf01b am: 8e55cd3f

am: 0ee25ef2

* commit '0ee25ef2':
  Add VPX output buffer size check
parents 8a9b5bfa 0ee25ef2
Loading
Loading
Loading
Loading
+14 −9
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ bool SoftVPX::outputBuffers(bool flushDecoder, bool display, bool eos, bool *por
        outHeader->nFlags = 0;
        outHeader->nFilledLen = (outputBufferWidth() * outputBufferHeight() * 3) / 2;
        outHeader->nTimeStamp = *(OMX_TICKS *)mImg->user_priv;

        if (outHeader->nAllocLen >= outHeader->nFilledLen) {
            uint8_t *dst = outHeader->pBuffer;
            const uint8_t *srcY = (const uint8_t *)mImg->planes[VPX_PLANE_Y];
            const uint8_t *srcU = (const uint8_t *)mImg->planes[VPX_PLANE_U];
@@ -165,6 +165,11 @@ bool SoftVPX::outputBuffers(bool flushDecoder, bool display, bool eos, bool *por
            size_t srcUStride = mImg->stride[VPX_PLANE_U];
            size_t srcVStride = mImg->stride[VPX_PLANE_V];
            copyYV12FrameToOutputBuffer(dst, srcY, srcU, srcV, srcYStride, srcUStride, srcVStride);
        } else {
            ALOGE("b/27597103, buffer too small");
            android_errorWriteLog(0x534e4554, "27597103");
            outHeader->nFilledLen = 0;
        }

        mImg = NULL;
        outInfo->mOwnedByUs = false;
+6 −1
Original line number Diff line number Diff line
@@ -183,7 +183,12 @@ void OMX::binderDied(const wp<IBinder> &the_late_who) {
        Mutex::Autolock autoLock(mLock);

        ssize_t index = mLiveNodes.indexOfKey(the_late_who);
        CHECK(index >= 0);

        if (index < 0) {
            ALOGE("b/27597103, nonexistent observer on binderDied");
            android_errorWriteLog(0x534e4554, "27597103");
            return;
        }

        instance = mLiveNodes.editValueAt(index);
        mLiveNodes.removeItemsAt(index);