Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 1 file). Show all
Unified · Split
| @@ -798,7 +798,8 @@ DECODING_STATE CWelsDecoder::ReorderPicturesInDisplay (unsigned char** ppDst, SB · 797 unmodified lines | ||
| 798 | 798 | ppDst[1] = m_sPictInfoList[m_iPictInfoIndex].pData[1]; |
| 799 | 799 | ppDst[2] = m_sPictInfoList[m_iPictInfoIndex].pData[2]; |
| 800 | 800 | m_sPictInfoList[m_iPictInfoIndex].iPOC = sIMinInt32; |
| 801 | − m_pDecContext->pPicBuff->ppPic[m_sPictInfoList[m_iPictInfoIndex].iPicBuffIdx]->bAvailableFlag = true; | |
| 801 | + if (m_sPictInfoList[m_iPictInfoIndex].iPicBuffIdx < m_pDecContext->pPicBuff->iCapacity) | |
| 802 | + m_pDecContext->pPicBuff->ppPic[m_sPictInfoList[m_iPictInfoIndex].iPicBuffIdx]->bAvailableFlag = true; | |
| 802 | 803 | m_sPictInfoList[m_iPictInfoIndex].bLastGOP = false; |
| 803 | 804 | m_iMinPOC = sIMinInt32; |
| 804 | 805 | --m_iNumOfPicts; |
| @@ -835,7 +836,8 @@ DECODING_STATE CWelsDecoder::ReorderPicturesInDisplay (unsigned char** ppDst, SB · 30 unmodified lines | ||
| 835 | 836 | ppDst[1] = m_sPictInfoList[m_iPictInfoIndex].pData[1]; |
| 836 | 837 | ppDst[2] = m_sPictInfoList[m_iPictInfoIndex].pData[2]; |
| 837 | 838 | m_sPictInfoList[m_iPictInfoIndex].iPOC = sIMinInt32; |
| 838 | − m_pDecContext->pPicBuff->ppPic[m_sPictInfoList[m_iPictInfoIndex].iPicBuffIdx]->bAvailableFlag = true; | |
| 839 | + if (m_sPictInfoList[m_iPictInfoIndex].iPicBuffIdx < m_pDecContext->pPicBuff->iCapacity) | |
| 840 | + m_pDecContext->pPicBuff->ppPic[m_sPictInfoList[m_iPictInfoIndex].iPicBuffIdx]->bAvailableFlag = true; | |
| 839 | 841 | m_sPictInfoList[m_iPictInfoIndex].bLastGOP = false; |
| 840 | 842 | m_iMinPOC = sIMinInt32; |
| 841 | 843 | --m_iNumOfPicts; |