the return value of this function is not suitable, it need report failure info to upper layer.
| 371 | |
| 372 | // the return value of this function is not suitable, it need report failure info to upper layer. |
| 373 | int32_t CWelsDecoder::InitDecoder (const SDecodingParam* pParam) { |
| 374 | |
| 375 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, |
| 376 | "CWelsDecoder::init_decoder(), openh264 codec version = %s, ParseOnly = %d", |
| 377 | VERSION_NUMBER, (int32_t)pParam->bParseOnly); |
| 378 | if (m_iThreadCount >= 1 && pParam->bParseOnly) { |
| 379 | m_iThreadCount = 0; |
| 380 | } |
| 381 | OpenDecoderThreads(); |
| 382 | //reset decoder context |
| 383 | memset (&m_sDecoderStatistics, 0, sizeof (SDecoderStatistics)); |
| 384 | memset (&m_sLastDecPicInfo, 0, sizeof (SWelsLastDecPicInfo)); |
| 385 | memset (&m_sVlcTable, 0, sizeof (SVlcTable)); |
| 386 | UninitDecoder(); |
| 387 | WelsDecoderLastDecPicInfoDefaults (m_sLastDecPicInfo); |
| 388 | for (int32_t i = 0; i < m_iCtxCount; ++i) { |
| 389 | InitDecoderCtx (m_pDecThrCtx[i].pCtx, pParam); |
| 390 | if (m_iThreadCount >= 1) { |
| 391 | m_pDecThrCtx[i].pCtx->pThreadCtx = &m_pDecThrCtx[i]; |
| 392 | } |
| 393 | } |
| 394 | m_bParamSetsLostFlag = false; |
| 395 | m_bFreezeOutput = false; |
| 396 | return cmResultSuccess; |
| 397 | } |
| 398 | |
| 399 | // the return value of this function is not suitable, it need report failure info to upper layer. |
| 400 | int32_t CWelsDecoder::InitDecoderCtx (PWelsDecoderContext& pCtx, const SDecodingParam* pParam) { |
nothing calls this directly
no test coverage detected