ref: 429ccb38a8614530c93f6931db6d4b3f2543892e
parent: 9ba0a1d977d50e6f5650d03286c40beb89058875
parent: 2527cf5d0b98f18bbee3d25d2ce99b40ddd52958
author: dongzha <[email protected]>
date: Wed Nov 12 08:18:08 EST 2014
Merge pull request #1524 from huili2/parse_err_return_bug_fix 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;