shithub: openh264

Download patch

ref: 00a2dc290c4172a691414370326f3390ccd0b8d9
parent: 0babd8d7ab569ab4bfd635ac26b4039a6b333e49
author: ruil2 <ruil2@cisco.com>
date: Thu Dec 25 11:58:29 EST 2014

modify trace info for LEVEL_UNKNOWN

--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -126,7 +126,10 @@
 void CheckLevelSetting (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam, int32_t iLayer, ELevelIdc uiLevelIdc) {
   SSpatialLayerConfig* pLayerInfo = &pParam->sSpatialLayers[iLayer];
   pLayerInfo->uiLevelIdc = uiLevelIdc;
-  if ((uiLevelIdc < LEVEL_1_0) || (uiLevelIdc > LEVEL_5_2)) {
+  if (uiLevelIdc == LEVEL_UNKNOWN) {
+    pLayerInfo->uiLevelIdc = LEVEL_1_0;
+    WelsLog (pLogCtx, WELS_LOG_INFO, "change LEVEL_UNKNOWN to LEVEL_1_0");
+  } else if ((uiLevelIdc < LEVEL_1_0) || (uiLevelIdc > LEVEL_5_2)) {
     pLayerInfo->uiLevelIdc = LEVEL_1_0;
     WelsLog (pLogCtx, WELS_LOG_WARNING, "doesn't support level(%d) change to LEVEL_1_0", uiLevelIdc);
   }