Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 7 files). Show all
Unified · Split
| @@ -71,9 +71,10 @@ int32_t WelsCodeOnePicPartition (sWelsEncCtx* pCtx, · 70 unmodified lines | |||
| 71 | 71 | ||
| 72 | 72 | ||
| 73 | int32_t WelsBitRateVerification (SLogContext* pLogCtx, SSpatialLayerConfig* pLayerParam, int32_t iLayerId) { | 73 | int32_t WelsBitRateVerification (SLogContext* pLogCtx, SSpatialLayerConfig* pLayerParam, int32_t iLayerId) { |
| 74 | if (pLayerParam->iSpatialBitrate <= 0) { | 74 | if ((pLayerParam->iSpatialBitrate <= 0) |
| 75 | WelsLog (pLogCtx, WELS_LOG_ERROR, "Invalid bitrate settings in layer %d, bitrate= %d", iLayerId, | 75 | || (static_cast<float> (pLayerParam->iSpatialBitrate) < pLayerParam->fFrameRate)) { |
| 76 | pLayerParam->iSpatialBitrate); | 76 | WelsLog (pLogCtx, WELS_LOG_ERROR, "Invalid bitrate settings in layer %d, bitrate= %d at FrameRate(%f)", iLayerId, |
| 77 | pLayerParam->iSpatialBitrate, pLayerParam->fFrameRate); | ||
| 77 | return ENC_RETURN_UNSUPPORTED_PARA; | 78 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 78 | } | 79 | } |
| 79 | 80 | ||