diff options
author | Andreas Huber <andih@google.com> | 2011-08-12 12:37:26 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-08-12 12:37:26 -0700 |
commit | 02bb0e4e3bccd0b5a87c46b248a8b05d3bb35844 (patch) | |
tree | 2e2b5f168b5b507d07e027de4c65e3e2dddfc462 /media | |
parent | 42a2b4cd571580e342b3e3cd77538deb467cea06 (diff) | |
parent | f77493e6560765882e09f4199e7f295564bede05 (diff) | |
download | frameworks_base-02bb0e4e3bccd0b5a87c46b248a8b05d3bb35844.zip frameworks_base-02bb0e4e3bccd0b5a87c46b248a8b05d3bb35844.tar.gz frameworks_base-02bb0e4e3bccd0b5a87c46b248a8b05d3bb35844.tar.bz2 |
Merge "Fix the software AAC decoder's AAC+ detection to ignore malformed frames"
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/codecs/aacdec/SoftAAC.cpp | 6 |
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; + } } } |