shithub: openh264

Download patch

ref: 54cc3daaa72ca7b688f581d88c0dd886d5c18fd7
parent: 8fb4048241690ce25bdc79c6d20bbbf65bac9ca5
author: Martin Storsjö <martin@martin.st>
date: Mon Dec 15 12:38:22 EST 2014

Cast a float to integer

This fixes warnings with MSVC.

--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -538,7 +538,7 @@
     const int32_t iNumLayers = pParam->iSpatialLayerNum;
     for (int32_t i = 0; i < iNumLayers; i++) {
         pLayerParam = & (pParam->sSpatialLayers[i]);
-        pLayerParam->iMaxSpatialBitrate = WELS_MIN(pLayerParam->iSpatialBitrate * (1+ iRang/100.0),pLayerParam->iMaxSpatialBitrate);
+        pLayerParam->iMaxSpatialBitrate = WELS_MIN((int) (pLayerParam->iSpatialBitrate * (1+ iRang/100.0)),pLayerParam->iMaxSpatialBitrate);
         if (WelsBitRateVerification (pLogCtx, pLayerParam, i) != ENC_RETURN_SUCCESS)
             return ENC_RETURN_UNSUPPORTED_PARA;
         WelsLog (pLogCtx, WELS_LOG_INFO,