ref: 2ddeb7031c2df4a2c32c1a4c848bbf3b8e232d9d
parent: 2f9ed225d5283921229516c1bffeadffc75bd78c
parent: c210ef7f7701186e8f95f0a9eaa3475b179cf36f
author: sijchen <sijchen@cisco.com>
date: Wed Apr 3 09:55:18 EDT 2019
Merge pull request #3118 from xiaotiansf/LastFixes Fix oss-fuzzer 14035. Reset all B-frame's reference's references when…
--- a/codec/decoder/core/src/manage_dec_ref.cpp
+++ b/codec/decoder/core/src/manage_dec_ref.cpp
@@ -126,6 +126,14 @@
pRef->bIsComplete = false; // Set complete flag to false for lost IDR ref picture
pRef->iSpsId = pCtx->pSps->iSpsId;
pRef->iPpsId = pCtx->pPps->iPpsId;
+ if (pCtx->eSliceType == B_SLICE) {
+ //reset reference's references when IDR is lost
+ for (int32_t list = LIST_0; list < LIST_A; ++list) {
+ for (int32_t i = 0; i < MAX_DPB_COUNT; ++i) {
+ pRef->pRefPic[list][i] = NULL;
+ }
+ }
+ }
pCtx->iErrorCode |= dsDataErrorConcealed;
bool bCopyPrevious = ((ERROR_CON_FRAME_COPY_CROSS_IDR == pCtx->pParam->eEcActiveIdc)
|| (ERROR_CON_SLICE_COPY_CROSS_IDR == pCtx->pParam->eEcActiveIdc)