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

Commit 859c897b authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "Ignore sideband parsing errors and spit out a frame of silence." into jb-dev

parents deb98e71 259b39cb
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -225,19 +225,19 @@ void SoftMP3::onQueueFilled(OMX_U32 portIndex) {
                != NO_DECODING_ERROR) {
            ALOGV("mp3 decoder returned error %d", decoderErr);

            if (decoderErr != NO_ENOUGH_MAIN_DATA_ERROR ||
                    mConfig->outputFrameSize == 0) {
            if (decoderErr != NO_ENOUGH_MAIN_DATA_ERROR
                        && decoderErr != SIDE_INFO_ERROR) {
                ALOGE("mp3 decoder returned error %d", decoderErr);

                if (mConfig->outputFrameSize == 0) {
                    ALOGE("Output frame size is 0");
                }

                notify(OMX_EventError, OMX_ErrorUndefined, decoderErr, NULL);
                mSignalledError = true;
                return;
            }

            if (mConfig->outputFrameSize == 0) {
                mConfig->outputFrameSize = kOutputBufferSize / sizeof(int16_t);
            }

            // This is recoverable, just ignore the current frame and
            // play silence instead.
            memset(outHeader->pBuffer,