summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs
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
commit122baae2f2aedca38fab723f7ad672044b0ce413 (patch)
tree39c607f4e3269e70e8f9b29920e43fa5021d7723 /media/libstagefright/codecs
parent8c67a583db53eebe65bd0c3abb41909c60a02eb0 (diff)
downloadframeworks_av-122baae2f2aedca38fab723f7ad672044b0ce413.zip
frameworks_av-122baae2f2aedca38fab723f7ad672044b0ce413.tar.gz
frameworks_av-122baae2f2aedca38fab723f7ad672044b0ce413.tar.bz2
Restore legacy soft-aac decoder behaviour. Substitute silence on decode error.
Change-Id: I680ccaabef32b1319819f723260cb3789585f09e related-to-bug: 4579486
Diffstat (limited to 'media/libstagefright/codecs')
-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) {