Skip to content

Commit

Permalink
Potential bug fix (#3818)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenzhengZhang authored Dec 19, 2024
1 parent 1c47e71 commit 63db555
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions codec/decoder/core/src/decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,10 @@ int32_t WelsDecodeBs (PWelsDecoderContext pCtx, const uint8_t* kpBsBuf, const in
return pCtx->iErrorCode;
}

if (pCtx->iErrorCode != ERR_NONE && !(pCtx->iErrorCode & dsDataErrorConcealed)) {
return pCtx->iErrorCode;
}

pDstNal += (iDstIdx + 4); //init, increase 4 reserved zero bytes, used to store the next NAL
if ((iSrcLength - iSrcConsumed + 4) > (pRawData->pEnd - pDstNal)) {
pDstNal = pRawData->pCurPos = pRawData->pHead;
Expand Down

0 comments on commit 63db555

Please sign in to comment.