summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-08-12 11:38:24 -0700
committerAndreas Huber <andih@google.com>2011-08-12 11:38:24 -0700
commita2e0a4259191fc486e0f563b992e3eadd7f9ae4b (patch)
tree7972c7dd410aa2c9ab93a3b96369a2fa2a036fa5 /media/libstagefright/codecs
parent6f3241d50fbe217df6cb82ff2b079135ea50c553 (diff)
downloadframeworks_av-a2e0a4259191fc486e0f563b992e3eadd7f9ae4b.zip
frameworks_av-a2e0a4259191fc486e0f563b992e3eadd7f9ae4b.tar.gz
frameworks_av-a2e0a4259191fc486e0f563b992e3eadd7f9ae4b.tar.bz2
Fix the software AAC decoder's AAC+ detection to ignore malformed frames
at the beginning of the stream. Change-Id: Ib990848c696896e7d43c80dec8119dec35704b74 related-to-bug: 5122512
Diffstat (limited to 'media/libstagefright/codecs')
-rw-r--r--media/libstagefright/codecs/aacdec/SoftAAC.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC.cpp b/media/libstagefright/codecs/aacdec/SoftAAC.cpp
index bbd6dbb..f0a330f 100644
--- a/media/libstagefright/codecs/aacdec/SoftAAC.cpp
+++ b/media/libstagefright/codecs/aacdec/SoftAAC.cpp
@@ -316,7 +316,7 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) {
* Thus, we could not say for sure whether a stream is
* AAC+/eAAC+ until the first data frame is decoded.
*/
- if (mInputBufferCount <= 2) {
+ if (decoderErr == MP4AUDEC_SUCCESS && mInputBufferCount <= 2) {
LOGV("audio/extended audio object type: %d + %d",
mConfig->audioObjectType, mConfig->extendedAudioObjectType);
LOGV("aac+ upsampling factor: %d desired channels: %d",
@@ -410,7 +410,9 @@ void SoftAAC::onQueueFilled(OMX_U32 portIndex) {
notifyFillBufferDone(outHeader);
outHeader = NULL;
- ++mInputBufferCount;
+ if (decoderErr == MP4AUDEC_SUCCESS) {
+ ++mInputBufferCount;
+ }
}
}