shithub: openh264

Download patch

ref: 85e5108452042db9e7d85a18a28605e3f0cc1d29
parent: 43f7c3c7481ddc834edafb684f749f230a4325e4
parent: c1620f3868d2b7458fe1b700c174c3e222658b9f
author: huili2 <[email protected]>
date: Wed May 28 12:14:29 EDT 2014

Merge pull request #900 from ruil2/enc_warnings

fix a bug that if..else are grouped incorrectly

--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -3833,12 +3833,12 @@
     int32_t iPayloadSize	= 0;
 
     if (iSliceIdx >= (pSliceCtx->iMaxSliceNumConstraint - kiSliceIdxStep)) {	// insufficient memory in pSliceInLayer[]
-      if (pCtx->iActiveThreadsNum == 1)
+      if (pCtx->iActiveThreadsNum == 1) {
         if (DynSliceRealloc (pCtx, pFrameBSInfo, pLayerBsInfo)) //only single thread support re-alloc now
           return ENC_RETURN_MEMALLOCERR;
-        else if (iSliceIdx >= pSliceCtx->iMaxSliceNumConstraint) {
-          return ENC_RETURN_MEMALLOCERR;
-        }
+      } else if (iSliceIdx >= pSliceCtx->iMaxSliceNumConstraint) {
+        return ENC_RETURN_MEMALLOCERR;
+      }
     }
 
     if (kbNeedPrefix) {