summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorDave Burke <daveburke@google.com>2012-05-17 21:05:38 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-17 21:05:38 -0700
commit3eda271f8b1879467759f98e5538577b1b6804f4 (patch)
tree14bdfa02a11ceed9294afe9124e25d1d650fbdb4 /media
parent8dfa228201131da0bf3ba1d74c819c27c0500f6b (diff)
parente672a0eea2cdc2ed43e002f0583902f20705de57 (diff)
downloadframeworks_av-3eda271f8b1879467759f98e5538577b1b6804f4.zip
frameworks_av-3eda271f8b1879467759f98e5538577b1b6804f4.tar.gz
frameworks_av-3eda271f8b1879467759f98e5538577b1b6804f4.tar.bz2
Merge "Clear the decoder input buffer after it signalled an error to be able to continue." into jb-dev
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/codecs/aacdec/SoftAAC2.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp
index 4000686..953b0c5 100644
--- a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp
+++ b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp
@@ -101,7 +101,7 @@ void SoftAAC2::initPorts() {
status_t SoftAAC2::initDecoder() {
status_t status = UNKNOWN_ERROR;
- mAACDecoder = aacDecoder_Open(TT_MP4_RAW, /* num layers */ 1);
+ mAACDecoder = aacDecoder_Open(TT_MP4_ADIF, /* num layers */ 1);
if (mAACDecoder != NULL) {
mStreamInfo = aacDecoder_GetStreamInfo(mAACDecoder);
if (mStreamInfo != NULL) {
@@ -428,6 +428,8 @@ void SoftAAC2::onQueueFilled(OMX_U32 portIndex) {
// Discard input buffer.
inHeader->nFilledLen = 0;
+ aacDecoder_SetParam(mAACDecoder, AAC_TPDEC_CLEAR_BUFFER, 1);
+
// fall through
}