Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 2 files). Show all
Unified · Split
| @@ -916,9 +916,11 @@ DECODING_STATE CWelsDecoder::DecodeFrame2 (const unsigned char* kpSrc, · 915 unmodified lines | ||
| 916 | 916 | DECODING_STATE CWelsDecoder::FlushFrame (unsigned char** ppDst, |
| 917 | 917 | SBufferInfo* pDstInfo) { |
| 918 | 918 | bool bEndOfStreamFlag = true; |
| 919 | − for (int32_t j = 0; j < m_iCtxCount; ++j) { | |
| 920 | − if (!m_pDecThrCtx[j].pCtx->bEndOfStreamFlag) { | |
| 921 | − bEndOfStreamFlag = false; | |
| 919 | + if (m_iThreadCount <= 1) { | |
| 920 | + for (int32_t j = 0; j < m_iCtxCount; ++j) { | |
| 921 | + if (!m_pDecThrCtx[j].pCtx->bEndOfStreamFlag) { | |
| 922 | + bEndOfStreamFlag = false; | |
| 923 | + } | |
| 922 | 924 | } |
| 923 | 925 | } |
| 924 | 926 | if (bEndOfStreamFlag && m_sReoderingStatus.iNumOfPicts > 0) { |