Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 1 file). Show all
Unified · Split
| @@ -717,6 +717,7 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in · 716 unmodified lines | ||
| 717 | 717 | iConsumedBytes = 0; |
| 718 | 718 | pDstNal[iDstIdx] = pDstNal[iDstIdx + 1] = pDstNal[iDstIdx + 2] = pDstNal[iDstIdx + 3] = |
| 719 | 719 | 0; // set 4 reserved bytes to zero |
| 720 | + pRawData->pCurPos = pDstNal + iDstIdx + 4; //init, increase 4 reserved zero bytes, used to store the next NAL | |
| 720 | 721 | pNalPayload = ParseNalHeader (pCtx, &pCtx->sCurNalHead, pDstNal, iDstIdx, pSrcNal - 3, iSrcIdx + 3, &iConsumedBytes); |
| 721 | 722 | if (pNalPayload) { //parse correct |
| 722 | 723 | if (IS_VCL_NAL (pCtx->sCurNalHead.eNalUnitType, 1)) { |
| @@ -749,7 +750,6 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in · 26 unmodified lines | ||
| 749 | 750 | } |
| 750 | 751 | return pCtx->iErrorCode; |
| 751 | 752 | } |
| 752 | − pRawData->pCurPos = pDstNal + iDstIdx + 4; //init, increase 4 reserved zero bytes, used to store the next NAL | |
| 753 | 753 | } else { /* no supplementary picture payload input, but stored a picture */ |
| 754 | 754 | PAccessUnit pCurAu = |
| 755 | 755 | pCtx->pAccessUnitList; // current access unit, it will never point to NULL after decode's successful initialization |