Showing the changes to codec/decoder/core/src/au_parser.cpp (1 of 4 files). Show all
Unified · Split
| @@ -312,6 +312,9 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 311 unmodified lines | ||
| 312 | 312 | InitBits (pBs, pNal, iBitSize); |
| 313 | 313 | iErr = ParseSliceHeaderSyntaxs (pCtx, pBs, bExtensionFlag); |
| 314 | 314 | if (iErr != ERR_NONE) { |
| 315 | + if ((uiAvailNalNum == 1) && (pCurNal->sNalHeaderExt.bIdrFlag)) { //IDR parse error | |
| 316 | + ResetActiveSPSForEachLayer (pCtx); | |
| 317 | + } | |
| 315 | 318 | //if current NAL occur error when parsing, should clean it from pNalUnitsList |
| 316 | 319 | //otherwise, when Next good NAL decoding, this corrupt NAL is considered as normal NAL and lead to decoder crash |
| 317 | 320 | ForceClearCurrentNal (pCurAu); |