diff options
author | Marco Nelissen <marcone@google.com> | 2013-04-16 15:57:38 -0700 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2013-04-16 16:06:46 -0700 |
commit | e42f027d19b20cf581be11a89e26b2c96c50c335 (patch) | |
tree | dbe6ee82e9f29aeb6b91441557d3e2e90d17269c /media/libstagefright/codecs | |
parent | f5c0211057be7a1d32f356d4162a84cce281394d (diff) | |
download | frameworks_av-e42f027d19b20cf581be11a89e26b2c96c50c335.zip frameworks_av-e42f027d19b20cf581be11a89e26b2c96c50c335.tar.gz frameworks_av-e42f027d19b20cf581be11a89e26b2c96c50c335.tar.bz2 |
Make sure the drain buffer is big enough
b/8614909
Change-Id: I9d973dcd74100b793791359c262b821207ff9ddd
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; } |