summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/mp3dec/SoftMP3.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-05-15 14:12:30 -0700
committerAndreas Huber <andih@google.com>2012-05-15 14:12:30 -0700
commit259b39cbfc03cb94c48e66d752836e153e9a2f8b (patch)
treead14ff6b63b39be8b3ee12de88a6cb21dcd7592d /media/libstagefright/codecs/mp3dec/SoftMP3.cpp
parent2986460984580833161bdaabc7f17da1005a8961 (diff)
downloadframeworks_av-259b39cbfc03cb94c48e66d752836e153e9a2f8b.zip
frameworks_av-259b39cbfc03cb94c48e66d752836e153e9a2f8b.tar.gz
frameworks_av-259b39cbfc03cb94c48e66d752836e153e9a2f8b.tar.bz2
Ignore sideband parsing errors and spit out a frame of silence.
Change-Id: I274d8e9018e02eb42121a2440b42caefeca94fb0 related-to-bug: 6498193
Diffstat (limited to 'media/libstagefright/codecs/mp3dec/SoftMP3.cpp')
-rw-r--r--media/libstagefright/codecs/mp3dec/SoftMP3.cpp12
1 files changed, 6 insertions, 6 deletions
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,