ref: 827c7b2aef972a4723359cac43d95384a9cedf5c
parent: d87663b9131eb40a062bab73da0c59714a3e3007
parent: 54cc3daaa72ca7b688f581d88c0dd886d5c18fd7
author: ruil2 <ruil2@cisco.com>
date: Tue Dec 16 04:09:53 EST 2014
Merge pull request #1629 from mstorsjo/msvc-casts Cast a float to integer
--- 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,