diff options
author | Marco Nelissen <marcone@google.com> | 2013-09-20 07:18:21 -0700 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2013-09-20 07:18:21 -0700 |
commit | ca1b3ee97a82a91c650da664ea2f2c47dbfaf621 (patch) | |
tree | 4e3c8d7580b6bc37456fc5cc5e48f0936ee60ff4 /media/libstagefright/codecs/aacdec/SoftAAC2.cpp | |
parent | a6cdabf38b29ee98bdb3e874b4e2978dbc409624 (diff) | |
download | frameworks_av-ca1b3ee97a82a91c650da664ea2f2c47dbfaf621.zip frameworks_av-ca1b3ee97a82a91c650da664ea2f2c47dbfaf621.tar.gz frameworks_av-ca1b3ee97a82a91c650da664ea2f2c47dbfaf621.tar.bz2 |
Fix aac decoder flush
b/8543366
Change-Id: I746ffed6289486b802a2292bfc492ea6c780ed0b
Diffstat (limited to 'media/libstagefright/codecs/aacdec/SoftAAC2.cpp')
-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; + } } } |