Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 10 files). Show all
Unified · Split
| @@ -744,6 +744,13 @@ void CWelsDecoder::OutputStatisticsLog (SDecoderStatistics& sDecoderStatistics) · 743 unmodified lines | |||
| 744 | 744 | ||
| 745 | DECODING_STATE CWelsDecoder::ReorderPicturesInDisplay (unsigned char** ppDst, SBufferInfo* pDstInfo) { | 745 | DECODING_STATE CWelsDecoder::ReorderPicturesInDisplay (unsigned char** ppDst, SBufferInfo* pDstInfo) { |
| 746 | if (pDstInfo->iBufferStatus == 1 && m_pDecContext->pSps->uiProfileIdc != 66) { | 746 | if (pDstInfo->iBufferStatus == 1 && m_pDecContext->pSps->uiProfileIdc != 66) { |
| 747 | //Non-reference B_FRAME (disposable) must be released and must not be buffered because its buffer could be overwritten by next reference picture. | ||
| 748 | if (m_pDecContext->pSliceHeader->eSliceType == B_SLICE && !m_pDecContext->pSliceHeader->bIsRefPic) { | ||
| 749 | if (m_pDecContext->pSliceHeader->iPicOrderCntLsb - m_LastWrittenPOC <= 2) { | ||
| 750 | m_LastWrittenPOC = m_pDecContext->pSliceHeader->iPicOrderCntLsb; | ||
| 751 | return dsErrorFree; | ||
| 752 | } | ||
| 753 | } | ||
| 747 | if (m_pDecContext->pSliceHeader->iPicOrderCntLsb == 0) { | 754 | if (m_pDecContext->pSliceHeader->iPicOrderCntLsb == 0) { |
| 748 | if (m_iNumOfPicts > 0) { | 755 | if (m_iNumOfPicts > 0) { |
| 749 | m_iLastGOPRemainPicts = m_iNumOfPicts; | 756 | m_iLastGOPRemainPicts = m_iNumOfPicts; |