Merge "Return transport decoder error in case of invalid ELD configuration" am: 7884aefc84

am: 81b04be9ba

Change-Id: Iab2c9ead062dd99dc441f7765bf02fb72736e37f
This commit is contained in:
Jean-Michel Trivi 2019-01-02 12:50:22 -08:00 committed by android-build-merger
commit 9cc8070883
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;
}
}