Skip to content

Commit

Permalink
Potential bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BenzhengZhang committed Dec 3, 2024
1 parent edbef4d commit bd4df10
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 bd4df10

Please sign in to comment.