summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2013-04-15 20:42:33 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-15 20:42:33 +0000
commitf4c873a64db2d5d2d74ca596e7482627dd6b4238 (patch)
treedf1bae17d7e2b832d0090a4e775edc0a333b37f4
parent5182337fcf848ca410ae61397752dfb0995067ef (diff)
parent7c5abbb0e1b20df4b265a08a8560899f637f9b44 (diff)
downloadframeworks_av-f4c873a64db2d5d2d74ca596e7482627dd6b4238.zip
frameworks_av-f4c873a64db2d5d2d74ca596e7482627dd6b4238.tar.gz
frameworks_av-f4c873a64db2d5d2d74ca596e7482627dd6b4238.tar.bz2
Merge "Fix AAC decoder reconfiguration" into jb-mr2-dev
-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 8ba2afb..536cfde 100644
--- a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp
+++ b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp
@@ -592,6 +592,12 @@ void SoftAAC2::drainDecoder() {
void SoftAAC2::onReset() {
drainDecoder();
+ // reset the "configured" state
+ mInputBufferCount = 0;
+ mNumSamplesOutput = 0;
+ // To make the codec behave the same before and after a reset, we need to invalidate the
+ // streaminfo struct. This does that:
+ mStreamInfo->sampleRate = 0;
}
void SoftAAC2::onPortEnableCompleted(OMX_U32 portIndex, bool enabled) {