diff options
author | Glenn Kasten <gkasten@android.com> | 2014-04-03 15:09:26 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-04-03 15:09:26 +0000 |
commit | 8260bf63e2fa974b524029f170d9ad17b69b884f (patch) | |
tree | 4902780df01f296a568f4c06d4be923e5a14575e /media | |
parent | d009aa2bac4a4c8ca2e0c1203148194e237cc5d0 (diff) | |
parent | 93bbc8343133b910aeae536617efce978040bbae (diff) | |
download | frameworks_av-8260bf63e2fa974b524029f170d9ad17b69b884f.zip frameworks_av-8260bf63e2fa974b524029f170d9ad17b69b884f.tar.gz frameworks_av-8260bf63e2fa974b524029f170d9ad17b69b884f.tar.bz2 |
am 93bbc834: Merge "Fix aac decoder flush"
* commit '93bbc8343133b910aeae536617efce978040bbae':
Fix aac decoder flush
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/codecs/aacdec/SoftAAC2.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp index c9b5d26..f842e27 100644 --- a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp +++ b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp @@ -567,6 +567,12 @@ void SoftAAC2::onPortFlushCompleted(OMX_U32 portIndex) { // depend on fragments from the last one decoded. // drain all existing data drainDecoder(); + // force decoder loop to drop the first decoded buffer by resetting these state variables, + // but only if initialization has already happened. + if (mInputBufferCount != 0) { + mInputBufferCount = 1; + mStreamInfo->sampleRate = 0; + } } } |