From 259b39cbfc03cb94c48e66d752836e153e9a2f8b Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Tue, 15 May 2012 14:12:30 -0700 Subject: Ignore sideband parsing errors and spit out a frame of silence. Change-Id: I274d8e9018e02eb42121a2440b42caefeca94fb0 related-to-bug: 6498193 --- media/libstagefright/codecs/mp3dec/SoftMP3.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'media') diff --git a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp index 92009ee..8f2a3aa 100644 --- a/media/libstagefright/codecs/mp3dec/SoftMP3.cpp +++ b/media/libstagefright/codecs/mp3dec/SoftMP3.cpp @@ -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, -- cgit v1.1