Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 2 files). Show all
Unified · Split
| @@ -768,7 +768,6 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 767 unmodified lines | ||
| 768 | 768 | } else if (uiQualityId > BASE_QUALITY_ID) { |
| 769 | 769 | WelsLog (pCtx, WELS_LOG_WARNING, "MGS not supported.\n"); |
| 770 | 770 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_MGS); |
| 771 | − pSliceHeadExt->uiRefLayerDqId = pNalHeaderExt->uiLayerDqId - 1; | |
| 772 | 771 | } else { |
| 773 | 772 | pSliceHeadExt->uiRefLayerDqId = (uint8_t) - 1; |
| 774 | 773 | } |
| @@ -1775,7 +1774,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3 · 1000 unmodified lines | ||
| 1775 | 1774 | } |
| 1776 | 1775 | GetI4LumaIChromaAddrTable (pCtx->iDecBlockOffsetArray, pCtx->pDec->iLinesize[0], pCtx->pDec->iLinesize[1]); |
| 1777 | 1776 | |
| 1778 | − if (pNalCur->sNalHeaderExt.uiLayerDqId > kuiTargetLayerDqId) { | |
| 1777 | + if ((pNalCur == NULL) || (pNalCur->sNalHeaderExt.uiLayerDqId > kuiTargetLayerDqId)) { | |
| 1779 | 1778 | break; // Per formance it need not to decode the remaining bits any more due to given uiLayerDqId required, 9/2/2009 |
| 1780 | 1779 | } |
| 1781 | 1780 | |