shithub: openh264

Download patch

ref: 3abd54ca730c4f73b49775750bd5b0bc449b9c93
parent: 8e49898243b2af71952e539bd89a45f840a65d37
parent: 655f3b43b64bdb2329f15b613cd4eb843cf71d6a
author: ruil2 <[email protected]>
date: Fri Oct 31 11:36:14 EDT 2014

Merge pull request #1477 from mstorsjo/avoid-msvc-warnings

Avoid warnings when building with MSVC

--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -957,7 +957,7 @@
     }
 
     // initialize pPps
-    WelsInitPps (pPps, pSps, pSubsetSps, iPpsId, true, bUseSubsetSps,pParam->iEntropyCodingModeFlag);
+    WelsInitPps (pPps, pSps, pSubsetSps, iPpsId, true, bUseSubsetSps,pParam->iEntropyCodingModeFlag != 0);
 
     // Not using FMO in SVC coding so far, come back if need FMO
     {
--- a/codec/encoder/core/src/svc_encode_slice.cpp
+++ b/codec/encoder/core/src/svc_encode_slice.cpp
@@ -748,7 +748,7 @@
   if (ENC_RETURN_SUCCESS != iEncReturn)
     return iEncReturn;
 
-  WelsWriteSliceEndSyn (pCurSlice, pEncCtx->pSvcParam->iEntropyCodingModeFlag);
+  WelsWriteSliceEndSyn (pCurSlice, pEncCtx->pSvcParam->iEntropyCodingModeFlag != 0);
 
   return ENC_RETURN_SUCCESS;
 }
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -617,8 +617,8 @@
 
   // rate control related
   if (0 != m_pEncContext->uiStartTimestamp && kiCurrentFrameTs > m_pEncContext->uiStartTimestamp + 800) {
-    pStatistics->fAverageFrameRate = pStatistics->uiInputFrameCount * 1000 /
-                                     (kiCurrentFrameTs - m_pEncContext->uiStartTimestamp);
+    pStatistics->fAverageFrameRate = (float) (pStatistics->uiInputFrameCount * 1000 /
+                                     (kiCurrentFrameTs - m_pEncContext->uiStartTimestamp));
   } else {
     m_pEncContext->uiStartTimestamp = kiCurrentFrameTs;
   }