From c1620f3868d2b7458fe1b700c174c3e222658b9f Mon Sep 17 00:00:00 2001 From: ruil2 Date: Tue, 27 May 2014 16:13:24 +0800 Subject: [PATCH] fix a bug that if..else are grouped incorrectly --- codec/encoder/core/src/encoder_ext.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/codec/encoder/core/src/encoder_ext.cpp b/codec/encoder/core/src/encoder_ext.cpp index 151e88fe..2b050312 100644 --- a/codec/encoder/core/src/encoder_ext.cpp +++ b/codec/encoder/core/src/encoder_ext.cpp @@ -3833,12 +3833,12 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, 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) {