From 8a341070f2d2053c8d791d8bd90c112bf5a1ae64 Mon Sep 17 00:00:00 2001 From: Karina Date: Thu, 19 May 2016 12:00:49 +0800 Subject: [PATCH] fix overflow issue --- codec/encoder/core/src/ratectl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codec/encoder/core/src/ratectl.cpp b/codec/encoder/core/src/ratectl.cpp index f21e61a2..3cd2be82 100644 --- a/codec/encoder/core/src/ratectl.cpp +++ b/codec/encoder/core/src/ratectl.cpp @@ -523,7 +523,7 @@ void RcInitSliceInformation (sWelsEncCtx* pEncCtx) { pSOverRc->iEndMbSlice += (pSliceInLayer[i].iCountMbNumInSlice - 1); pSOverRc->iTotalQpSlice = 0; pSOverRc->iTotalMbSlice = 0; - pSOverRc->iTargetBitsSlice = WELS_DIV_ROUND (kiBitsPerMb * pSliceInLayer[i].iCountMbNumInSlice, INT_MULTIPLY); + pSOverRc->iTargetBitsSlice = WELS_DIV_ROUND (static_cast (kiBitsPerMb) * pSliceInLayer[i].iCountMbNumInSlice, INT_MULTIPLY); pSOverRc->iFrameBitsSlice = 0; pSOverRc->iGomBitsSlice = 0; }