diff options
author | Marco Nelissen <marcone@google.com> | 2013-09-23 22:43:09 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-09-23 22:43:10 +0000 |
commit | a7868f92ec1a8ae2f7d68d435d971761a9b93150 (patch) | |
tree | 3a0b2d74a3e812df400a90a7ec094f91b74c22e9 /media | |
parent | 342d52bc0ebc4be85b4806dae9addce2230d01b4 (diff) | |
parent | ca1b3ee97a82a91c650da664ea2f2c47dbfaf621 (diff) | |
download | frameworks_av-a7868f92ec1a8ae2f7d68d435d971761a9b93150.zip frameworks_av-a7868f92ec1a8ae2f7d68d435d971761a9b93150.tar.gz frameworks_av-a7868f92ec1a8ae2f7d68d435d971761a9b93150.tar.bz2 |
Merge "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; + } } } |