summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-06-20 16:19:09 -0700
committerAndreas Huber <andih@google.com>2011-06-20 16:19:09 -0700
commitdabf22181d912de9f32b51b023ac4c0ee6ec7a17 (patch)
treec9c5560c34f8facf9a6b83392aa82b2ef3004fe5 /media
parentb2af97e9a11119a257289cb8c539b5de79093052 (diff)
downloadframeworks_base-dabf22181d912de9f32b51b023ac4c0ee6ec7a17.zip
frameworks_base-dabf22181d912de9f32b51b023ac4c0ee6ec7a17.tar.gz
frameworks_base-dabf22181d912de9f32b51b023ac4c0ee6ec7a17.tar.bz2
Restore legacy soft-aac decoder behaviour. Substitute silence on decode error.
Change-Id: I680ccaabef32b1319819f723260cb3789585f09e related-to-bug: 4579486
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/codecs/aacdec/SoftAAC.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC.cpp b/media/libstagefright/codecs/aacdec/SoftAAC.cpp
index 7ce6128..bbd6dbb 100644
--- a/media/libstagefright/codecs/aacdec/SoftAAC.cpp
+++ b/media/libstagefright/codecs/aacdec/SoftAAC.cpp
@@ -367,7 +367,15 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) {
inHeader->nFilledLen -= mConfig->inputBufferUsedLength;
inHeader->nOffset += mConfig->inputBufferUsedLength;
} else {
+ LOGW("AAC decoder returned error %d, substituting silence",
+ decoderErr);
+
memset(outHeader->pBuffer + outHeader->nOffset, 0, numOutBytes);
+
+ // Discard input buffer.
+ inHeader->nFilledLen = 0;
+
+ // fall through
}
if (mUpsamplingFactor == 2) {