shithub: openh264

Download patch

ref: dcdd49608226d29ed4517688bafb97e51c293cc5
parent: b940e2cdf8937a59db9ef606b89134ebc2eb3fef
author: sijchen <sijchen@cisco.com>
date: Mon Jan 11 09:57:11 EST 2016

fix a bug in multi-layer case in task-management

--- a/codec/encoder/core/src/wels_task_management.cpp
+++ b/codec/encoder/core/src/wels_task_management.cpp
@@ -123,7 +123,7 @@
 WelsErrorType CWelsTaskManageBase::CreateTasks (sWelsEncCtx* pEncCtx, const int32_t kiCurDid) {
   CWelsBaseTask* pTask = NULL;
   int32_t kiTaskCount;
-  uint32_t uiSliceMode = pEncCtx->pSvcParam->sSpatialLayers[0].sSliceArgument.uiSliceMode;
+  uint32_t uiSliceMode = pEncCtx->pSvcParam->sSpatialLayers[kiCurDid].sSliceArgument.uiSliceMode;
 
   if (uiSliceMode != SM_SIZELIMITED_SLICE) {
     kiTaskCount = m_iTaskNum[kiCurDid] = pEncCtx->pSvcParam->sSpatialLayers[kiCurDid].sSliceArgument.uiSliceNum;