Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 2 files). Show all
Unified · Split
| @@ -145,7 +145,14 @@ int32_t ParamValidation (SLogContext* pLogCtx, SWelsSvcCodingParam* pCfg) { · 144 unmodified lines | |||
| 145 | || fMaxFrameRate - pCfg->fMaxFrameRate < -fEpsn)) { | 145 | || fMaxFrameRate - pCfg->fMaxFrameRate < -fEpsn)) { |
| 146 | pCfg->fMaxFrameRate = fMaxFrameRate; | 146 | pCfg->fMaxFrameRate = fMaxFrameRate; |
| 147 | } | 147 | } |
| 148 | //bitrate setting validation | 148 | |
| 149 | |||
| 150 | if ((pCfg->iRCMode != RC_OFF_MODE) && (pCfg->iRCMode != RC_QUALITY_MODE) && (pCfg->iRCMode != RC_BITRATE_MODE) | ||
| 151 | && (pCfg->iRCMode != RC_LOW_BW_MODE)) { | ||
| 152 | WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidation(),Invalid iRCMode = %d\n", pCfg->iRCMode); | ||
| 153 | return ENC_RETURN_UNSUPPORTED_PARA; | ||
| 154 | } | ||
| 155 | //bitrate setting validation | ||
| 149 | if (pCfg->iRCMode != RC_OFF_MODE) { | 156 | if (pCfg->iRCMode != RC_OFF_MODE) { |
| 150 | int32_t iTotalBitrate = 0; | 157 | int32_t iTotalBitrate = 0; |
| 151 | if (pCfg->iTargetBitrate <= 0) { | 158 | if (pCfg->iTargetBitrate <= 0) { |