Merge pull request #1335 from lyao2/fixppsbug

fix pps caused death loop issue
This commit is contained in:
dongzha 2014-09-05 14:18:16 +08:00
commit ef590de0dc

View File

@ -2680,7 +2680,6 @@ void ParasetIdAdditionIdAdjust (SParaSetOffsetVariable* sParaSetOffsetVariable,
//31st finish: next_spsid_in_bs == 1; //31st finish: next_spsid_in_bs == 1;
const int32_t kiEncId = kiCurEncoderParaSetId; const int32_t kiEncId = kiCurEncoderParaSetId;
const bool* kpUsedIdPointer = &sParaSetOffsetVariable->bUsedParaSetIdInBs[0];
uint32_t uiNextIdInBs = sParaSetOffsetVariable->uiNextParaSetIdToUseInBs; uint32_t uiNextIdInBs = sParaSetOffsetVariable->uiNextParaSetIdToUseInBs;
//update current layer's pCodingParam //update current layer's pCodingParam
@ -2691,20 +2690,12 @@ void ParasetIdAdditionIdAdjust (SParaSetOffsetVariable* sParaSetOffsetVariable,
//prepare for next update: //prepare for next update:
// find the next avaibable iId // find the next avaibable iId
do { ++uiNextIdInBs;
++uiNextIdInBs; if (uiNextIdInBs >= kuiMaxIdInBs) {
if (uiNextIdInBs >= kuiMaxIdInBs) { uiNextIdInBs = 0;//ensure the SPS_ID wound not exceed MAX_SPS_COUNT
uiNextIdInBs = 0;//ensure the SPS_ID wound not exceed MAX_SPS_COUNT }
}
} while (kpUsedIdPointer[uiNextIdInBs]);
// update next_id // update next_id
sParaSetOffsetVariable->uiNextParaSetIdToUseInBs = uiNextIdInBs; sParaSetOffsetVariable->uiNextParaSetIdToUseInBs = uiNextIdInBs;
#if _DEBUG
assert (!sParaSetOffsetVariable->bUsedParaSetIdInBs[uiNextIdInBs]); //sure the next-to-use one is marked activated correctly
#endif
} }
/*! /*!