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