ref: 0fefca2d859c2fc056a49917538c7850057cc22e
parent: cdcb538c12168cc11d4fe2da65b3c5732498d3d6
author: xiaotiansf <[email protected]>
date: Tue Jan 29 16:17:04 EST 2019
Additional fix for Bugzilla reported bug-1522172. Do not try tocontinue B-frame temporal direct prediction when previously encountered a concealed errors.
--- a/codec/decoder/core/src/decode_slice.cpp
+++ b/codec/decoder/core/src/decode_slice.cpp
@@ -2371,6 +2371,12 @@
memset (pCurLayer->pRefIndex[LIST_1][iMbXy], 0, sizeof (int8_t) * 16);
pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || ! (ppRefPicL0[0] && ppRefPicL0[0]->bIsComplete)
|| ! (ppRefPicL1[0] && ppRefPicL1[0]->bIsComplete);
+
+ if (pCtx->bMbRefConcealed) {
+ SLogContext* pLogCtx = & (pCtx->sLogCtx);
+ WelsLog (pLogCtx, WELS_LOG_ERROR, "Ref Picture for B-Slice is lost, B-Slice decoding cannot be continued!");
+ return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_DATA, ERR_INFO_REFERENCE_PIC_LOST);
+ }
//predict iMv
SubMbType subMbType;
if (pSliceHeader->iDirectSpatialMvPredFlag) {