History

fix pps caused death loop issue

lyao2 committed 12 years ago

Commit 881667a1 parent d63172d1 file · +4 −13Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+4−13
@@ -2680,7 +2680,6 @@ void ParasetIdAdditionIdAdjust (SParaSetOffsetVariable* sParaSetOffsetVariable, · 2679 unmodified lines
26802680 //31st finish: next_spsid_in_bs == 1;
26812681
26822682 const int32_t kiEncId = kiCurEncoderParaSetId;
2683− const bool* kpUsedIdPointer = &sParaSetOffsetVariable->bUsedParaSetIdInBs[0];
26842683 uint32_t uiNextIdInBs = sParaSetOffsetVariable->uiNextParaSetIdToUseInBs;
26852684
26862685 //update current layer's pCodingParam
@@ -2691,20 +2690,12 @@ void ParasetIdAdditionIdAdjust (SParaSetOffsetVariable* sParaSetOffsetVariable, · 4 unmodified lines
26912690
26922691 //prepare for next update:
26932692 // find the next avaibable iId
2694− do {
2695− ++uiNextIdInBs;
2696− if (uiNextIdInBs >= kuiMaxIdInBs) {
2697− uiNextIdInBs = 0;//ensure the SPS_ID wound not exceed MAX_SPS_COUNT
2698− }
2699− } while (kpUsedIdPointer[uiNextIdInBs]);
2700−
2693+ ++uiNextIdInBs;
2694+ if (uiNextIdInBs >= kuiMaxIdInBs) {
2695+ uiNextIdInBs = 0;//ensure the SPS_ID wound not exceed MAX_SPS_COUNT
2696+ }
27012697 // update next_id
27022698 sParaSetOffsetVariable->uiNextParaSetIdToUseInBs = uiNextIdInBs;
2703−
2704−#if _DEBUG
2705− assert (!sParaSetOffsetVariable->bUsedParaSetIdInBs[uiNextIdInBs]); //sure the next-to-use one is marked activated correctly
2706−#endif
2707−
27082699 }
27092700
27102701 /*!

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t