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

Commit 5a42238b authored by Marco Nelissen's avatar Marco Nelissen Committed by android-build-merger
Browse files

Merge "Check mp3 output buffer size" into klp-dev am: bc736f65 am: 44ef3995 am: a70a752e

am: 2a05d85b

* commit '2a05d85b':
  Check mp3 output buffer size

Change-Id: Ia0d6f0d0e0458cb341c1ae546c2c6951d4db8a72
parents 1bc35dd0 2a05d85b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -247,6 +247,14 @@ void SoftMP3::onQueueFilled(OMX_U32 /* portIndex */) {
        mConfig->inputBufferUsedLength = 0;

        mConfig->outputFrameSize = kOutputBufferSize / sizeof(int16_t);
        if ((int32)outHeader->nAllocLen < mConfig->outputFrameSize) {
            ALOGE("input buffer too small: got %lu, expected %u",
                outHeader->nAllocLen, mConfig->outputFrameSize);
            android_errorWriteLog(0x534e4554, "27793371");
            notify(OMX_EventError, OMX_ErrorUndefined, OUTPUT_BUFFER_TOO_SMALL, NULL);
            mSignalledError = true;
            return;
        }

        mConfig->pOutputBuffer =
            reinterpret_cast<int16_t *>(outHeader->pBuffer);