mirror of
https://github.com/mstorsjo/fdk-aac.git
synced 2025-02-11 09:00:39 +01:00
Validate aacSampleRate after applying ELD downscale factor. Avoid division by zero.
Bug: 131430997 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I3f7ece9451121d40fab2c97571c695c1ac62bd00
This commit is contained in:
parent
dbfa1cd71b
commit
128abf6b1a
@ -1928,6 +1928,9 @@ CAacDecoder_Init(HANDLE_AACDECODER self, const CSAudioSpecificConfig *asc,
|
||||
self->samplingRateInfo[0].samplingRate / self->downscaleFactor;
|
||||
self->streamInfo.aacSamplesPerFrame =
|
||||
asc->m_samplesPerFrame / self->downscaleFactor;
|
||||
if (self->streamInfo.aacSampleRate <= 0) {
|
||||
return AAC_DEC_UNSUPPORTED_SAMPLINGRATE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user