mirror of
https://github.com/mstorsjo/fdk-aac.git
synced 2025-02-17 03:30:35 +01:00
Add sampling rate sanity check
am: ba00378577 Change-Id: I9173c64ea2386a987aa563fc89bdaa7652f649b0
This commit is contained in:
commit
4d1f3e3cfb
@ -2102,7 +2102,9 @@ TRANSPORTDEC_ERROR AudioSpecificConfig_Parse(
|
||||
self->m_aot = getAOT(bs);
|
||||
self->m_samplingFrequency =
|
||||
getSampleRate(bs, &self->m_samplingFrequencyIndex, 4);
|
||||
if (self->m_samplingFrequency <= 0) {
|
||||
if (self->m_samplingFrequency <= 0 ||
|
||||
(self->m_samplingFrequency > 96000 && self->m_aot != 39) ||
|
||||
self->m_samplingFrequency > 4 * 96000) {
|
||||
return TRANSPORTDEC_PARSE_ERROR;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user