diff options
author | Andreas Huber <andih@google.com> | 2011-06-20 16:19:09 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2011-06-20 16:19:09 -0700 |
commit | dabf22181d912de9f32b51b023ac4c0ee6ec7a17 (patch) | |
tree | c9c5560c34f8facf9a6b83392aa82b2ef3004fe5 /media | |
parent | b2af97e9a11119a257289cb8c539b5de79093052 (diff) | |
download | frameworks_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.cpp | 8 |
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) { |