Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 2 files). Show all
Unified · Split
| @@ -295,6 +295,9 @@ int32_t CWelsDecoder::ResetDecoder() { · 294 unmodified lines | ||
| 295 | 295 | } else if (m_pWelsTrace != NULL) { |
| 296 | 296 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "ResetDecoder() failed as decoder context null"); |
| 297 | 297 | } |
| 298 | +#ifdef _PICTURE_REORDERING_ | |
| 299 | + ResetReorderingPictureBuffers(); | |
| 300 | +#endif | |
| 298 | 301 | return ERR_INFO_UNINIT; |
| 299 | 302 | } |
| 300 | 303 | |
| @@ -971,6 +974,18 @@ DECODING_STATE CWelsDecoder::DecodeFrameEx (const unsigned char* kpSrc, · 670 unmodified lines | ||
| 971 | 974 | return state; |
| 972 | 975 | } |
| 973 | 976 | |
| 977 | +void CWelsDecoder::ResetReorderingPictureBuffers() { | |
| 978 | + m_iPictInfoIndex = 0; | |
| 979 | + m_iMinPOC = sIMinInt32; | |
| 980 | + m_iNumOfPicts = 0; | |
| 981 | + m_iLastGOPRemainPicts = 0; | |
| 982 | + m_LastWrittenPOC = sIMinInt32; | |
| 983 | + m_iLargestBufferedPicIndex = 0; | |
| 984 | + for (int32_t i = 0; i < 16; ++i) { | |
| 985 | + m_sPictInfoList[i].bLastGOP = false; | |
| 986 | + m_sPictInfoList[i].iPOC = sIMinInt32; | |
| 987 | + } | |
| 988 | +} | |
| 974 | 989 | |
| 975 | 990 | } // namespace WelsDec |
| 976 | 991 | |