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

Commit 8a0b060f 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:...

Merge "Check mp3 output buffer size" into klp-dev am: bc736f65 am: 44ef3995 am: a70a752e am: 2a05d85b am: 5a42238b am: 847d3358 am: 7a221148 am: 94dd8230 am: 738e2901 am: 434aa919
am: 65688b02

* commit '65688b02':
  Check mp3 output buffer size

Change-Id: I0cfc271bd397a2bdc3591ace1ef45ea1c8c0b817
parents e7abcf0e 65688b02
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -263,6 +263,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);