mirror of https://github.com/mstorsjo/fdk-aac.git
Fix input buffer flushing for PS encoder.
Bug 177604812 Test: see PS/SBR encoder Change-Id: I3152bd7db5e039ecc54885e5b58c1cf6cb598b28
This commit is contained in:
parent
bd021e7fb4
commit
4fbc97cc47
|
@ -1827,12 +1827,13 @@ AACENC_ERROR aacEncEncode(const HANDLE_AACENCODER hAacEncoder,
|
|||
|
||||
/* clear out until end-of-buffer */
|
||||
if (nZeros) {
|
||||
INT_PCM *pIn =
|
||||
hAacEncoder->inputBuffer +
|
||||
hAacEncoder->inputBufferOffset /
|
||||
hAacEncoder->aacConfig.nChannels +
|
||||
hAacEncoder->nSamplesRead / hAacEncoder->extParam.nChannels;
|
||||
for (i = 0; i < (int)hAacEncoder->extParam.nChannels; i++) {
|
||||
FDKmemclear(hAacEncoder->inputBuffer +
|
||||
i * hAacEncoder->inputBufferSizePerChannel +
|
||||
(hAacEncoder->inputBufferOffset +
|
||||
hAacEncoder->nSamplesRead) /
|
||||
hAacEncoder->extParam.nChannels,
|
||||
FDKmemclear(pIn + i * hAacEncoder->inputBufferSizePerChannel,
|
||||
sizeof(INT_PCM) * nZeros);
|
||||
}
|
||||
hAacEncoder->nZerosAppended += nZeros;
|
||||
|
|
Loading…
Reference in New Issue