Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 2 files). Show all
Unified · Split
| @@ -363,6 +363,7 @@ void CWelsDecoder::UninitDecoderCtx (PWelsDecoderContext& pCtx) { · 362 unmodified lines | ||
| 363 | 363 | |
| 364 | 364 | pCtx = NULL; |
| 365 | 365 | } |
| 366 | + if (m_iCtxCount <= 1) m_pDecThrCtx[0].pCtx = NULL; | |
| 366 | 367 | } |
| 367 | 368 | } |
| 368 | 369 | |
| @@ -408,7 +409,7 @@ int32_t CWelsDecoder::InitDecoderCtx (PWelsDecoderContext& pCtx, const SDecoding · 39 unmodified lines | ||
| 408 | 409 | int32_t iCacheLineSize = 16; // on chip cache line size in byte |
| 409 | 410 | pCtx->pMemAlign = new CMemoryAlign (iCacheLineSize); |
| 410 | 411 | WELS_VERIFY_RETURN_PROC_IF (cmMallocMemeError, (NULL == pCtx->pMemAlign), UninitDecoderCtx (pCtx)) |
| 411 | − | |
| 412 | + if (m_iCtxCount <= 1) m_pDecThrCtx[0].pCtx = pCtx; | |
| 412 | 413 | //fill in default value into context |
| 413 | 414 | pCtx->pLastDecPicInfo = &m_sLastDecPicInfo; |
| 414 | 415 | pCtx->pDecoderStatistics = &m_sDecoderStatistics; |