summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@android.com>2014-04-03 15:01:21 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-04-03 15:01:22 +0000
commit93bbc8343133b910aeae536617efce978040bbae (patch)
tree0645a0440cbb2f4bda446d3e073916c82d30e033
parent2b2fbe299163b544668b41f594943a19b78dafd3 (diff)
parent08fce45fdb537e135868604522aba15461f516be (diff)
downloadframeworks_av-93bbc8343133b910aeae536617efce978040bbae.zip
frameworks_av-93bbc8343133b910aeae536617efce978040bbae.tar.gz
frameworks_av-93bbc8343133b910aeae536617efce978040bbae.tar.bz2
Merge "Fix aac decoder flush"
-rw-r--r--media/libstagefright/codecs/aacdec/SoftAAC2.cpp6
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;
+ }
}
}