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
450 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "ResetDecoder() failed as decoder context null");450 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "ResetDecoder() failed as decoder context null");
451 }451 }
452 ResetReorderingPictureBuffers (&m_sReoderingStatus, m_sPictInfoList, false);452 ResetReorderingPictureBuffers (&m_sReoderingStatus, m_sPictInfoList, false);
453 if (pCtx->pDstInfo) pCtx->pDstInfo->iBufferStatus = 0;
453 }454 }
454 return ERR_INFO_UNINIT;455 return ERR_INFO_UNINIT;
455}456}
@@ -461,6 +462,7 @@ int32_t CWelsDecoder::ThreadResetDecoder (PWelsDecoderContext& pCtx) { · 5 unmodified lines
461 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "ResetDecoder(), context error code is %d", pCtx->iErrorCode);462 WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "ResetDecoder(), context error code is %d", pCtx->iErrorCode);
462 memcpy (&sPrevParam, pCtx->pParam, sizeof (SDecodingParam));463 memcpy (&sPrevParam, pCtx->pParam, sizeof (SDecodingParam));
463 ResetReorderingPictureBuffers (&m_sReoderingStatus, m_sPictInfoList, true);464 ResetReorderingPictureBuffers (&m_sReoderingStatus, m_sPictInfoList, true);
465 if (pCtx->pDstInfo) pCtx->pDstInfo->iBufferStatus = 0;
464 CloseDecoderThreads();466 CloseDecoderThreads();
465 UninitDecoder();467 UninitDecoder();
466 InitDecoder (&sPrevParam);468 InitDecoder (&sPrevParam);
@@ -811,11 +813,6 @@ DECODING_STATE CWelsDecoder::DecodeFrame2WithCtx (PWelsDecoderContext pDecContex · 344 unmodified lines
811 }813 }
812 return dsErrorFree;814 return dsErrorFree;
813 }815 }
814 if ((pDecContext->iErrorCode & (dsBitstreamError | dsDataErrorConcealed)) && pDecContext->eSliceType == B_SLICE) {
815 ResetReorderingPictureBuffers (&m_sReoderingStatus, m_sPictInfoList, true);
816 WelsResetRefPic (pDecContext);
817 return dsErrorFree;
818 }
819 //for AVC bitstream (excluding AVC with temporal scalability, including TP), as long as error occur, SHOULD notify upper layer key frame loss.816 //for AVC bitstream (excluding AVC with temporal scalability, including TP), as long as error occur, SHOULD notify upper layer key frame loss.
820 if ((IS_PARAM_SETS_NALS (eNalType) || NAL_UNIT_CODED_SLICE_IDR == eNalType) ||817 if ((IS_PARAM_SETS_NALS (eNalType) || NAL_UNIT_CODED_SLICE_IDR == eNalType) ||
821 (VIDEO_BITSTREAM_AVC == pDecContext->eVideoType)) {818 (VIDEO_BITSTREAM_AVC == pDecContext->eVideoType)) {
@@ -910,6 +907,7 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 88 unmodified lines
910 unsigned char** ppDst,907 unsigned char** ppDst,
911 SBufferInfo* pDstInfo) {908 SBufferInfo* pDstInfo) {
912 PWelsDecoderContext pDecContext = m_pDecThrCtx[0].pCtx;909 PWelsDecoderContext pDecContext = m_pDecThrCtx[0].pCtx;
910 pDecContext->pDstInfo = pDstInfo;
913 return DecodeFrame2WithCtx (pDecContext, kpSrc, kiSrcLen, ppDst, pDstInfo);911 return DecodeFrame2WithCtx (pDecContext, kpSrc, kiSrcLen, ppDst, pDstInfo);
914}912}
915 913

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