ref: 2527cf5d0b98f18bbee3d25d2ce99b40ddd52958
parent: f42c9fae422b062f87fb38223f7f1e3c658d7c8d
author: huili2 <huili2@cisco.com>
date: Tue Nov 11 14:23:58 EST 2014
fix bug of parse error return for VCL data
--- a/codec/decoder/core/src/au_parser.cpp
+++ b/codec/decoder/core/src/au_parser.cpp
@@ -314,6 +314,11 @@
iBitSize = (iNalSize << 3) - BsGetTrailingBits (pNal + iNalSize - 1); // convert into bit
iErr = InitBits (pBs, pNal, iBitSize);
if (iErr) {
+ ForceClearCurrentNal (pCurAu);
+ if (uiAvailNalNum > 1) {
+ pCurAu->uiEndPos = uiAvailNalNum - 2;
+ pCtx->bAuReadyFlag = true;
+ }
WelsLog (pLogCtx, WELS_LOG_ERROR, "NAL_UNIT_CODED_SLICE: InitBits() fail due invalid access.");
pCtx->iErrorCode |= dsBitstreamError;
return NULL;