diff options
author | Marco Nelissen <marcone@google.com> | 2013-04-17 16:38:17 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-04-17 16:38:17 -0700 |
commit | 503261ce9e616b16056e54c37e1e3dfdc1077763 (patch) | |
tree | f5bd24b9d3d155252f7cfab1d498a978546d3805 /media/libstagefright/codecs | |
parent | 8160921de80aeff12436ee1c2bfdae77fc4914b9 (diff) | |
parent | 4707c9b04891e5cf7772de74e9c229bce028c87d (diff) | |
download | frameworks_av-503261ce9e616b16056e54c37e1e3dfdc1077763.zip frameworks_av-503261ce9e616b16056e54c37e1e3dfdc1077763.tar.gz frameworks_av-503261ce9e616b16056e54c37e1e3dfdc1077763.tar.bz2 |
am 4707c9b0: am f7baffd1: Merge "Make sure the drain buffer is big enough" into jb-mr2-dev
* commit '4707c9b04891e5cf7772de74e9c229bce028c87d':
Make sure the drain buffer is big enough
Diffstat (limited to 'media/libstagefright/codecs')
-rw-r--r-- | media/libstagefright/codecs/aacdec/SoftAAC2.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp index cf81c16..cf50dc9 100644 --- a/media/libstagefright/codecs/aacdec/SoftAAC2.cpp +++ b/media/libstagefright/codecs/aacdec/SoftAAC2.cpp @@ -586,9 +586,12 @@ void SoftAAC2::onPortFlushCompleted(OMX_U32 portIndex) { } void SoftAAC2::drainDecoder() { - short buf [2048]; - aacDecoder_DecodeFrame(mAACDecoder, buf, 4096, AACDEC_FLUSH | AACDEC_CLRHIST | AACDEC_INTR); - aacDecoder_DecodeFrame(mAACDecoder, buf, 4096, AACDEC_FLUSH | AACDEC_CLRHIST | AACDEC_INTR); + // a buffer big enough for 6 channels of decoded HE-AAC + short buf [2048*6]; + aacDecoder_DecodeFrame(mAACDecoder, + buf, sizeof(buf), AACDEC_FLUSH | AACDEC_CLRHIST | AACDEC_INTR); + aacDecoder_DecodeFrame(mAACDecoder, + buf, sizeof(buf), AACDEC_FLUSH | AACDEC_CLRHIST | AACDEC_INTR); aacDecoder_SetParam(mAACDecoder, AAC_TPDEC_CLEAR_BUFFER, 1); mDecoderHasData = false; } |