Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1740,6 +1740,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3 · 1739 unmodified lines | ||
| 1740 | 1740 | InitCurDqLayerData (pCtx, pCtx->pCurDqLayer); |
| 1741 | 1741 | |
| 1742 | 1742 | pNalCur = pCurAu->pNalUnitsList[iIdx]; |
| 1743 | + if (pNalCur == NULL) | |
| 1744 | + return ERR_NONE; | |
| 1743 | 1745 | while (iIdx <= iEndIdx) { |
| 1744 | 1746 | PDqLayer dq_cur = pCtx->pCurDqLayer; |
| 1745 | 1747 | SLayerInfo pLayerInfo; |
| @@ -1774,7 +1776,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3 · 28 unmodified lines | ||
| 1774 | 1776 | } |
| 1775 | 1777 | GetI4LumaIChromaAddrTable (pCtx->iDecBlockOffsetArray, pCtx->pDec->iLinesize[0], pCtx->pDec->iLinesize[1]); |
| 1776 | 1778 | |
| 1777 | − if ((pNalCur == NULL) || (pNalCur->sNalHeaderExt.uiLayerDqId > kuiTargetLayerDqId)) { | |
| 1779 | + if (pNalCur->sNalHeaderExt.uiLayerDqId > kuiTargetLayerDqId) { // confirmed pNalCur will never be NULL | |
| 1778 | 1780 | break; // Per formance it need not to decode the remaining bits any more due to given uiLayerDqId required, 9/2/2009 |
| 1779 | 1781 | } |
| 1780 | 1782 | |