Skip to content

Commit

Permalink
Fix oss-fuzzer 14035. Reset all B-frame's reference's references when…
Browse files Browse the repository at this point in the history
… IDR is lost to prevent temporal prediction from trying to access lost references.
  • Loading branch information
xiaotiansf committed Apr 3, 2019
1 parent 8159a25 commit 3999b22
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions codec/decoder/core/src/manage_dec_ref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ static int32_t WelsCheckAndRecoverForFutureDecoding (PWelsDecoderContext pCtx) {
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 < 17; ++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)
Expand Down

0 comments on commit 3999b22

Please sign in to comment.