Return transport decoder error in case of invalid ELD configuration

Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc

Change-Id: I65c98830d361a82c9d173eadb44ff245cd076fdf
This commit is contained in:
Fraunhofer IIS FDK 2018-12-20 15:52:46 +01:00 committed by Jean-Michel Trivi
parent 443d32ea7f
commit 5174d33de0
1 changed files with 8 additions and 0 deletions

View File

@ -1420,6 +1420,10 @@ static TRANSPORTDEC_ERROR EldSpecificConfig_Parse(CSAudioSpecificConfig *asc,
if (ErrorStatus != TRANSPORTDEC_OK) {
return TRANSPORTDEC_PARSE_ERROR;
}
if (esc->m_downscaledSamplingFrequency != asc->m_samplingFrequency) {
return TRANSPORTDEC_UNSUPPORTED_FORMAT; /* ELDv2 w/ ELD downscaled
mode not allowed */
}
break;
}
@ -1441,6 +1445,10 @@ static TRANSPORTDEC_ERROR EldSpecificConfig_Parse(CSAudioSpecificConfig *asc,
if (downscale_fill_nibble != 0x0) {
return TRANSPORTDEC_PARSE_ERROR;
}
if (esc->m_useLdQmfTimeAlign == 1) {
return TRANSPORTDEC_UNSUPPORTED_FORMAT; /* ELDv2 w/ ELD downscaled
mode not allowed */
}
break;
}
}