Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all
Unified · Split
| @@ -90,19 +90,15 @@ int32_t ParamValidation (SWelsSvcCodingParam* pCfg) { · 89 unmodified lines | ||
| 90 | 90 | if (fDlp->fOutputFrameRate > fDlp->fInputFrameRate || (fDlp->fInputFrameRate >= -fEpsn |
| 91 | 91 | && fDlp->fInputFrameRate <= fEpsn) |
| 92 | 92 | || (fDlp->fOutputFrameRate >= -fEpsn && fDlp->fOutputFrameRate <= fEpsn)) { |
| 93 | −#if defined (_DEBUG) | |
| 94 | − fprintf (stderr, "Invalid settings in input frame rate(%.6f) or output frame rate(%.6f) of layer #%d config file..\n", | |
| 93 | + WelsLog (NULL, WELS_LOG_ERROR,"Invalid settings in input frame rate(%.6f) or output frame rate(%.6f) of layer #%d config file..\n", | |
| 95 | 94 | fDlp->fInputFrameRate, fDlp->fOutputFrameRate, i); |
| 96 | −#endif | |
| 97 | − return 1; | |
| 95 | + return ENC_RETURN_INVALIDINPUT; | |
| 98 | 96 | } |
| 99 | 97 | if (UINT_MAX == GetLogFactor (fDlp->fOutputFrameRate, fDlp->fInputFrameRate)) { |
| 100 | −#if defined (_DEBUG) | |
| 101 | − fprintf (stderr, | |
| 98 | + WelsLog (NULL,WELS_LOG_ERROR, | |
| 102 | 99 | "Invalid settings in input frame rate(%.6f) and output frame rate(%.6f) of layer #%d config file: iResult of output frame rate divided by input frame rate should be power of 2(i.e,in/pOut=2^n)..\n", |
| 103 | 100 | fDlp->fInputFrameRate, fDlp->fOutputFrameRate, i); |
| 104 | −#endif | |
| 105 | − return 1; | |
| 101 | + return ENC_RETURN_INVALIDINPUT; | |
| 106 | 102 | } |
| 107 | 103 | } |
| 108 | 104 | |
| @@ -117,7 +113,7 @@ int32_t ParamValidation (SWelsSvcCodingParam* pCfg) { · 8 unmodified lines | ||
| 117 | 113 | pCfg->fMaxFrameRate = fMaxFrameRate; |
| 118 | 114 | } |
| 119 | 115 | |
| 120 | − return 0; | |
| 116 | + return ENC_RETURN_SUCCESS; | |
| 121 | 117 | } |
| 122 | 118 | |
| 123 | 119 | |