Merge changes I7add6dff,I0249f758 am: b42dfa745b

am: 8bdeed59aa

Change-Id: I335f3e5f617add8bdbfc6e5c0bb6a0eab80f4f9a
This commit is contained in:
Fraunhofer IIS FDK 2019-01-02 12:49:57 -08:00 committed by android-build-merger
commit e8d354305f
1 changed files with 18 additions and 6 deletions

View File

@ -572,16 +572,18 @@ SACDEC_ERROR SpatialDecParseSpecificConfig(
numHeaderBits = cfgStartPos - (INT)FDKgetValidBits(bitstream); numHeaderBits = cfgStartPos - (INT)FDKgetValidBits(bitstream);
bitsAvailable -= numHeaderBits; bitsAvailable -= numHeaderBits;
if (bitsAvailable < 0) {
err = MPS_PARSE_ERROR;
goto bail;
}
pSpatialSpecificConfig->sacExtCnt = 0; pSpatialSpecificConfig->sacExtCnt = 0;
pSpatialSpecificConfig->bResidualCoding = 0; pSpatialSpecificConfig->bResidualCoding = 0;
if ((err == MPS_OK) && (bitsAvailable > 0)) {
err = SpatialDecParseExtensionConfig( err = SpatialDecParseExtensionConfig(
bitstream, pSpatialSpecificConfig, pSpatialSpecificConfig->nOttBoxes, bitstream, pSpatialSpecificConfig, pSpatialSpecificConfig->nOttBoxes,
pSpatialSpecificConfig->nTttBoxes, pSpatialSpecificConfig->nTttBoxes,
pSpatialSpecificConfig->nOutputChannels, bitsAvailable); pSpatialSpecificConfig->nOutputChannels, bitsAvailable);
}
FDKbyteAlign( FDKbyteAlign(
bitstream, bitstream,
@ -1868,6 +1870,16 @@ SACDEC_ERROR SpatialDecDecodeFrame(spatialDec *self, SPATIAL_BS_FRAME *frame) {
frame->numParameterSets = frame->numParameterSets =
fixMin(MAX_PARAMETER_SETS, frame->numParameterSets + 1); fixMin(MAX_PARAMETER_SETS, frame->numParameterSets + 1);
frame->paramSlot[frame->numParameterSets - 1] = self->timeSlots - 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: bail: