| 97 | } |
| 98 | |
| 99 | static DECODING_STATE ConstructAccessUnit (CWelsDecoder* pWelsDecoder, PWelsDecoderThreadCTX pThrCtx) { |
| 100 | int iRet = dsErrorFree; |
| 101 | //WelsMutexLock (&pWelsDecoder->m_csDecoder); |
| 102 | if (pThrCtx->pCtx->pLastThreadCtx != NULL) { |
| 103 | PWelsDecoderThreadCTX pLastThreadCtx = (PWelsDecoderThreadCTX) (pThrCtx->pCtx->pLastThreadCtx); |
| 104 | WAIT_EVENT (&pLastThreadCtx->sSliceDecodeStart, WELS_DEC_THREAD_WAIT_INFINITE); |
| 105 | RESET_EVENT (&pLastThreadCtx->sSliceDecodeStart); |
| 106 | } |
| 107 | pThrCtx->pDec = NULL; |
| 108 | if (GetThreadCount (pThrCtx->pCtx) > 1) { |
| 109 | RESET_EVENT (&pThrCtx->sSliceDecodeFinish); |
| 110 | } |
| 111 | iRet |= pWelsDecoder->DecodeFrame2WithCtx (pThrCtx->pCtx, NULL, 0, pThrCtx->ppDst, &pThrCtx->sDstInfo); |
| 112 | |
| 113 | //WelsMutexUnlock (&pWelsDecoder->m_csDecoder); |
| 114 | return (DECODING_STATE)iRet; |
| 115 | } |
| 116 | |
| 117 | DECLARE_PROCTHREAD (pThrProcFrame, p) { |
| 118 | SWelsDecoderThreadCTX* pThrCtx = (SWelsDecoderThreadCTX*)p; |
no test coverage detected