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:
parent
4a22282fe0
commit
f440f28aa3
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user