History

B Slice bitstream error concealment support. Fix OSS-FUZZ reported erors: 26285,26291,26296,26301,26302,26303,26319,26323,29431 and more

xiaotianshimail committed 5 years ago

Commit 51a138e1 parent be8e62f6 files · +18 −5Browse files

Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 6 files). Show all

Unified · Split

codec/decoder/plus/src/welsDecoderExt.cpp+3−5
@@ -450,6 +450,7 @@ int32_t CWelsDecoder::ResetDecoder (PWelsDecoderContext& pCtx) { · 449 unmodified lines
450450 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "ResetDecoder() failed as decoder context null");
451451 }
452452 ResetReorderingPictureBuffers (&m_sReoderingStatus, m_sPictInfoList, false);
453+ if (pCtx->pDstInfo) pCtx->pDstInfo->iBufferStatus = 0;
453454 }
454455 return ERR_INFO_UNINIT;
455456 }
@@ -461,6 +462,7 @@ int32_t CWelsDecoder::ThreadResetDecoder (PWelsDecoderContext& pCtx) { · 5 unmodified lines
461462 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "ResetDecoder(), context error code is %d", pCtx->iErrorCode);
462463 memcpy (&sPrevParam, pCtx->pParam, sizeof (SDecodingParam));
463464 ResetReorderingPictureBuffers (&m_sReoderingStatus, m_sPictInfoList, true);
465+ if (pCtx->pDstInfo) pCtx->pDstInfo->iBufferStatus = 0;
464466 CloseDecoderThreads();
465467 UninitDecoder();
466468 InitDecoder (&sPrevParam);
@@ -811,11 +813,6 @@ DECODING_STATE CWelsDecoder::DecodeFrame2WithCtx (PWelsDecoderContext pDecContex · 344 unmodified lines
811813 }
812814 return dsErrorFree;
813815 }
814− if ((pDecContext->iErrorCode & (dsBitstreamError | dsDataErrorConcealed)) && pDecContext->eSliceType == B_SLICE) {
815− ResetReorderingPictureBuffers (&m_sReoderingStatus, m_sPictInfoList, true);
816− WelsResetRefPic (pDecContext);
817− return dsErrorFree;
818− }
819816 //for AVC bitstream (excluding AVC with temporal scalability, including TP), as long as error occur, SHOULD notify upper layer key frame loss.
820817 if ((IS_PARAM_SETS_NALS (eNalType) || NAL_UNIT_CODED_SLICE_IDR == eNalType) ||
821818 (VIDEO_BITSTREAM_AVC == pDecContext->eVideoType)) {
@@ -910,6 +907,7 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 88 unmodified lines
910907 unsigned char** ppDst,
911908 SBufferInfo* pDstInfo) {
912909 PWelsDecoderContext pDecContext = m_pDecThrCtx[0].pCtx;
910+ pDecContext->pDstInfo = pDstInfo;
913911 return DecodeFrame2WithCtx (pDecContext, kpSrc, kiSrcLen, ppDst, pDstInfo);
914912 }
915913

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t