History

remove unnecessary check, confirmed safe usage

Licai Guo committed 12 years ago

Commit 048dea41 parent a5337731 file · +3 −1Browse files

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

Unified · Split

codec/decoder/core/src/decoder_core.cpp+3−1
@@ -1740,6 +1740,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3 · 1739 unmodified lines
17401740 InitCurDqLayerData (pCtx, pCtx->pCurDqLayer);
17411741
17421742 pNalCur = pCurAu->pNalUnitsList[iIdx];
1743+ if (pNalCur == NULL)
1744+ return ERR_NONE;
17431745 while (iIdx <= iEndIdx) {
17441746 PDqLayer dq_cur = pCtx->pCurDqLayer;
17451747 SLayerInfo pLayerInfo;
@@ -1774,7 +1776,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3 · 28 unmodified lines
17741776 }
17751777 GetI4LumaIChromaAddrTable (pCtx->iDecBlockOffsetArray, pCtx->pDec->iLinesize[0], pCtx->pDec->iLinesize[1]);
17761778
1777− if ((pNalCur == NULL) || (pNalCur->sNalHeaderExt.uiLayerDqId > kuiTargetLayerDqId)) {
1779+ if (pNalCur->sNalHeaderExt.uiLayerDqId > kuiTargetLayerDqId) { // confirmed pNalCur will never be NULL
17781780 break; // Per formance it need not to decode the remaining bits any more due to given uiLayerDqId required, 9/2/2009
17791781 }
17801782

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