Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 2 files). Show all
Unified · Split
| @@ -597,7 +597,8 @@ void CWelsH264SVCEncoder::UpdateStatistics (const int64_t kiCurrentFrameTs, EVid · 596 unmodified lines | |||
| 597 | } | 597 | } |
| 598 | 598 | ||
| 599 | if (m_pEncContext->pSvcParam->iRCMode == RC_QUALITY_MODE || m_pEncContext->pSvcParam->iRCMode == RC_BITRATE_MODE) { | 599 | if (m_pEncContext->pSvcParam->iRCMode == RC_QUALITY_MODE || m_pEncContext->pSvcParam->iRCMode == RC_BITRATE_MODE) { |
| 600 | if (WELS_ABS (pStatistics->fLatestFrameRate - m_pEncContext->pSvcParam->fMaxFrameRate) > 5) { | 600 | if ((pStatistics->fLatestFrameRate > 0) |
| 601 | && WELS_ABS (m_pEncContext->pSvcParam->fMaxFrameRate - pStatistics->fLatestFrameRate) > 5) { | ||
| 601 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, | 602 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, |
| 602 | "Actual Input Framerate %f is different from framerate in setting %f, suggest to use other rate control modes", | 603 | "Actual Input Framerate %f is different from framerate in setting %f, suggest to use other rate control modes", |
| 603 | pStatistics->fLatestFrameRate, m_pEncContext->pSvcParam->fMaxFrameRate); | 604 | pStatistics->fLatestFrameRate, m_pEncContext->pSvcParam->fMaxFrameRate); |