shithub: openh264

Download patch

ref: 1ff9de36ceebaf4fae51ebba0e780cb986f5fe9c
parent: 22cc0a88c6e5c3053ba686f78c24c7098f436613
author: Martin Storsjö <[email protected]>
date: Tue Nov 25 09:28:20 EST 2014

Explicitly cast int64_t to float

This fixes warnings when bulding with MSVC.

--- 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);
       }