Commit 63db555e for openh264
commit 63db555e30986e3a5f07871368dc90ae78c27449
Author: BenzhengZhang <140143892+BenzhengZhang@users.noreply.github.com>
Date: Thu Dec 19 17:12:42 2024 +0800
Potential bug fix (#3818)
diff --git a/codec/decoder/core/src/decoder.cpp b/codec/decoder/core/src/decoder.cpp
index 6c634202..e3f14b8c 100644
--- a/codec/decoder/core/src/decoder.cpp
+++ b/codec/decoder/core/src/decoder.cpp
@@ -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;