mirror of https://github.com/mstorsjo/fdk-aac.git
Add sampling rate sanity check
Bug: 112661641 Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I8e416fb1501dabda20babd4a28a99ab06950b221
This commit is contained in:
parent
f19e863cce
commit
ba00378577
|
@ -2102,7 +2102,9 @@ TRANSPORTDEC_ERROR AudioSpecificConfig_Parse(
|
||||||
self->m_aot = getAOT(bs);
|
self->m_aot = getAOT(bs);
|
||||||
self->m_samplingFrequency =
|
self->m_samplingFrequency =
|
||||||
getSampleRate(bs, &self->m_samplingFrequencyIndex, 4);
|
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;
|
return TRANSPORTDEC_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue