mirror of
https://github.com/mstorsjo/fdk-aac.git
synced 2025-01-30 15:35:16 +01:00
Merge changes I7add6dff,I0249f758
am: b42dfa745b Change-Id: I7c8544215b13db8440c4a72671996da0fac3be2e
This commit is contained in:
commit
8bdeed59aa
@ -572,16 +572,18 @@ SACDEC_ERROR SpatialDecParseSpecificConfig(
|
||||
|
||||
numHeaderBits = cfgStartPos - (INT)FDKgetValidBits(bitstream);
|
||||
bitsAvailable -= numHeaderBits;
|
||||
if (bitsAvailable < 0) {
|
||||
err = MPS_PARSE_ERROR;
|
||||
goto bail;
|
||||
}
|
||||
|
||||
pSpatialSpecificConfig->sacExtCnt = 0;
|
||||
pSpatialSpecificConfig->bResidualCoding = 0;
|
||||
|
||||
if ((err == MPS_OK) && (bitsAvailable > 0)) {
|
||||
err = SpatialDecParseExtensionConfig(
|
||||
bitstream, pSpatialSpecificConfig, pSpatialSpecificConfig->nOttBoxes,
|
||||
pSpatialSpecificConfig->nTttBoxes,
|
||||
pSpatialSpecificConfig->nOutputChannels, bitsAvailable);
|
||||
}
|
||||
err = SpatialDecParseExtensionConfig(
|
||||
bitstream, pSpatialSpecificConfig, pSpatialSpecificConfig->nOttBoxes,
|
||||
pSpatialSpecificConfig->nTttBoxes,
|
||||
pSpatialSpecificConfig->nOutputChannels, bitsAvailable);
|
||||
|
||||
FDKbyteAlign(
|
||||
bitstream,
|
||||
@ -1868,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…
x
Reference in New Issue
Block a user