diff options
author | Martin Storsjo <martin@martin.st> | 2017-03-14 14:37:45 +0200 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2017-03-14 14:37:45 +0200 |
commit | 32c712cbd10975888a6e0bd117387a2c65e5a23c (patch) | |
tree | a5af2a7e499d5022a16f959c70f1f21f2ca6fae1 /libAACdec/src | |
parent | 74c1a2a4f831285cbd93ec1427f1670d3c5c5e52 (diff) | |
parent | b0af861f5a0671d1bb65339fdb674cca15090b71 (diff) | |
download | fdk-aac-32c712cbd10975888a6e0bd117387a2c65e5a23c.tar.gz fdk-aac-32c712cbd10975888a6e0bd117387a2c65e5a23c.tar.bz2 fdk-aac-32c712cbd10975888a6e0bd117387a2c65e5a23c.zip |
Merge remote-tracking branch 'aosp/master'
Diffstat (limited to 'libAACdec/src')
-rw-r--r-- | libAACdec/src/aacdecoder_lib.cpp | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/libAACdec/src/aacdecoder_lib.cpp b/libAACdec/src/aacdecoder_lib.cpp index 8863da5..50efb0f 100644 --- a/libAACdec/src/aacdecoder_lib.cpp +++ b/libAACdec/src/aacdecoder_lib.cpp @@ -791,36 +791,29 @@ LINKSPEC_CPP AAC_DECODER_ERROR aacDecoder_DecodeFrame( const UINT flags) { AAC_DECODER_ERROR ErrorStatus; - INT layer; - INT nBits; - INT interleaved = self->outputInterleaved; - HANDLE_FDK_BITSTREAM hBs; int fTpInterruption = 0; /* Transport originated interruption detection. */ int fTpConceal = 0; /* Transport originated concealment. */ - INT_PCM *pTimeData = NULL; - INT timeDataSize = 0; - if (self == NULL) { return AAC_DEC_INVALID_HANDLE; } - - pTimeData = self->pcmOutputBuffer; - timeDataSize = sizeof(self->pcmOutputBuffer)/sizeof(*self->pcmOutputBuffer); + INT interleaved = self->outputInterleaved; + INT_PCM *pTimeData = self->pcmOutputBuffer; + INT timeDataSize = sizeof(self->pcmOutputBuffer)/sizeof(*self->pcmOutputBuffer); if (flags & AACDEC_INTR) { self->streamInfo.numLostAccessUnits = 0; } - hBs = transportDec_GetBitstream(self->hInput, 0); + HANDLE_FDK_BITSTREAM hBs = transportDec_GetBitstream(self->hInput, 0); /* Get current bits position for bitrate calculation. */ - nBits = FDKgetValidBits(hBs); + INT nBits = FDKgetValidBits(hBs); if (! (flags & (AACDEC_CONCEAL | AACDEC_FLUSH) ) ) { TRANSPORTDEC_ERROR err; - for(layer = 0; layer < self->nrOfLayers; layer++) + for(INT layer = 0; layer < self->nrOfLayers; layer++) { err = transportDec_ReadAccessUnit(self->hInput, layer); if (err != TRANSPORTDEC_OK) { |