1
0
mirror of https://github.com/mstorsjo/fdk-aac.git synced 2025-01-23 20:30:43 +01:00

Return SpatialDecDecodeFrame() parse error in case extended frame does not match the spatial frame

Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc

Change-Id: I7add6dff3b60ba0b36e5c83cee8031b37e970890
This commit is contained in:
Fraunhofer IIS FDK 2018-12-20 15:52:46 +01:00 committed by Jean-Michel Trivi
parent 4a22282fe0
commit f440f28aa3

View File

@ -1870,6 +1870,16 @@ SACDEC_ERROR SpatialDecDecodeFrame(spatialDec *self, SPATIAL_BS_FRAME *frame) {
frame->numParameterSets =
fixMin(MAX_PARAMETER_SETS, frame->numParameterSets + 1);
frame->paramSlot[frame->numParameterSets - 1] = self->timeSlots - 1;
for (int p = 0; p < frame->numParameterSets; p++) {
if (frame->paramSlot[p] > self->timeSlots - 1) {
frame->paramSlot[p] = self->timeSlots - 1;
err = MPS_PARSE_ERROR;
}
}
if (err != MPS_OK) {
goto bail;
}
}
bail: