shithub: openh264

Download patch

ref: 265741e92294538a1e3d1500bb17abd18e827722
parent: fee0f14732c88c7a11bbb4d40becfd37717b9208
author: Licai Guo <[email protected]>
date: Sun Feb 23 13:26:28 EST 2014

update according to review comments

--- a/codec/decoder/core/src/au_parser.cpp
+++ b/codec/decoder/core/src/au_parser.cpp
@@ -972,11 +972,11 @@
   if (((uint64_t)pSps->iMbHeight * (uint64_t)pSps->iMbHeight) > (8 * pSLevelLimits->iMaxFS)) {
     WelsLog (pCtx, WELS_LOG_WARNING, " the pic_height_in_mbs exceeds the level limits!\n");
   }
-  uint64_t uiTmp64 = (uint64_t)pSps->iMbWidth * (uint64_t)pSps->iMbHeight;
-  if (uiTmp64 > (uint32_t)pSLevelLimits->iMaxFS) {
+  uint32_t uiTmp32 = pSps->iMbWidth * pSps->iMbHeight;
+  if (uiTmp32 > (uint32_t)pSLevelLimits->iMaxFS) {
     WelsLog (pCtx, WELS_LOG_WARNING, " the total count of mb exceeds the level limits!\n");
   }
-  pSps->uiTotalMbCount	= uiTmp64;
+  pSps->uiTotalMbCount	= uiTmp32;
   WELS_CHECK_SE_UPPER_ERROR (pSps->iNumRefFrames, SPS_MAX_NUM_REF_FRAMES_MAX, "max_num_ref_frames",
                              GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_MAX_NUM_REF_FRAMES));
   // here we check max_num_ref_frames