ref: 7be8d200d58e8f47ed2475d5558ce242cf9c4eff
parent: 22cc0a88c6e5c3053ba686f78c24c7098f436613
parent: 1ff9de36ceebaf4fae51ebba0e780cb986f5fe9c
author: sijchen <[email protected]>
date: Tue Nov 25 04:12:37 EST 2014
Merge pull request #1554 from mstorsjo/add-float-cast Explicitly cast int64_t to float
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -642,8 +642,8 @@
int64_t iTimeDiff = kiCurrentFrameTs - m_pEncContext->iLastStatisticsLogTs;
if ((iTimeDiff > m_pEncContext->iStatisticsLogInterval) || (0 == pStatistics->uiInputFrameCount % 300)) {
if (iTimeDiff) {
- pStatistics->fLatestFrameRate = (pStatistics->uiInputFrameCount - m_pEncContext->iLastStatisticsFrameCount) * 1000 /
- iTimeDiff;
+ pStatistics->fLatestFrameRate = static_cast<float> ((pStatistics->uiInputFrameCount - m_pEncContext->iLastStatisticsFrameCount) * 1000 /
+ iTimeDiff);
pStatistics->uiBitRate = static_cast<unsigned int> ((m_pEncContext->iTotalEncodedBits -
m_pEncContext->iLastStatisticsBits) * 1000 / iTimeDiff);
}