Add casts when converting from int64_t or double to int32_t
This fixes warnings when building with MSVC.
This commit is contained in:
parent
cc5978b252
commit
901a599b36
@ -821,7 +821,7 @@ void UpdateMaxBrCheckWindowStatus(void* pCtx, int32_t iSpatialNum, const long lo
|
|||||||
pEncCtx->iCheckWindowCurrentTs = pEncCtx->iCheckWindowStartTs = uiTimeStamp;
|
pEncCtx->iCheckWindowCurrentTs = pEncCtx->iCheckWindowStartTs = uiTimeStamp;
|
||||||
pEncCtx->bCheckWindowStatusRefreshFlag = true;
|
pEncCtx->bCheckWindowStatusRefreshFlag = true;
|
||||||
}
|
}
|
||||||
pEncCtx->iCheckWindowInterval = pEncCtx->iCheckWindowCurrentTs - pEncCtx->iCheckWindowStartTs;
|
pEncCtx->iCheckWindowInterval = (int32_t) (pEncCtx->iCheckWindowCurrentTs - pEncCtx->iCheckWindowStartTs);
|
||||||
if(pEncCtx->iCheckWindowInterval >= (TIME_CHECK_WINDOW >> 1) && !pEncCtx->bCheckWindowShiftResetFlag) {
|
if(pEncCtx->iCheckWindowInterval >= (TIME_CHECK_WINDOW >> 1) && !pEncCtx->bCheckWindowShiftResetFlag) {
|
||||||
pEncCtx->bCheckWindowShiftResetFlag = true;
|
pEncCtx->bCheckWindowShiftResetFlag = true;
|
||||||
for (int32_t i = 0; i < iSpatialNum; i++) {
|
for (int32_t i = 0; i < iSpatialNum; i++) {
|
||||||
@ -875,7 +875,7 @@ void RcTraceFrameBits (void* pCtx, long long uiTimeStamp) {
|
|||||||
SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
|
SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
|
||||||
|
|
||||||
if (pWelsSvcRc->iPredFrameBit != 0)
|
if (pWelsSvcRc->iPredFrameBit != 0)
|
||||||
pWelsSvcRc->iPredFrameBit = LAST_FRAME_PREDICT_WEIGHT * pWelsSvcRc->iFrameDqBits + (1 - LAST_FRAME_PREDICT_WEIGHT) * pWelsSvcRc->iPredFrameBit;
|
pWelsSvcRc->iPredFrameBit = (int32_t) (LAST_FRAME_PREDICT_WEIGHT * pWelsSvcRc->iFrameDqBits + (1 - LAST_FRAME_PREDICT_WEIGHT) * pWelsSvcRc->iPredFrameBit);
|
||||||
else
|
else
|
||||||
pWelsSvcRc->iPredFrameBit = pWelsSvcRc->iFrameDqBits;
|
pWelsSvcRc->iPredFrameBit = pWelsSvcRc->iFrameDqBits;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user