shithub: openh264

Download patch

ref: a5e4cca71021faff8cf3f1747ac99c963e0e7a65
parent: 3fd490dbedae851ef5996d9867980eec8958683d
parent: 8a341070f2d2053c8d791d8bd90c112bf5a1ae64
author: sijchen <sijchen@cisco.com>
date: Wed May 18 17:35:32 EDT 2016

Merge pull request #2467 from ruil2/overflow

fix overflow issue

--- a/codec/encoder/core/src/ratectl.cpp
+++ b/codec/encoder/core/src/ratectl.cpp
@@ -523,7 +523,7 @@
     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<int64_t> (kiBitsPerMb) * pSliceInLayer[i].iCountMbNumInSlice, INT_MULTIPLY);
     pSOverRc->iFrameBitsSlice   = 0;
     pSOverRc->iGomBitsSlice     = 0;
   }