summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-06-21 08:36:51 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-06-21 08:36:51 -0700
commit551e95607ce83c0d491a2c12cdae4aa92197dc2c (patch)
treea775eb0daa1f1075c94cda815a3280c040431129
parent3d1d7767afc7c488197ec40a22739159c5110721 (diff)
parent122baae2f2aedca38fab723f7ad672044b0ce413 (diff)
downloadframeworks_av-551e95607ce83c0d491a2c12cdae4aa92197dc2c.zip
frameworks_av-551e95607ce83c0d491a2c12cdae4aa92197dc2c.tar.gz
frameworks_av-551e95607ce83c0d491a2c12cdae4aa92197dc2c.tar.bz2
Merge "Restore legacy soft-aac decoder behaviour. Substitute silence on decode error."
-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) {