fix bug in set option return value
Showing the changes to codec/encoder/plus/src/welsEncoderExt.cpp (1 of 3 files). Show all
Unified · Split
| @@ -750,7 +750,9 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 749 unmodified lines | ||
| 750 | 750 | #endif//REC_FRAME_COUNT |
| 751 | 751 | |
| 752 | 752 | /* Check every field whether there is new request for memory block changed or else, Oct. 24, 2008 */ |
| 753 | − WelsEncoderParamAdjust (&m_pEncContext, &sConfig); | |
| 753 | + if (WelsEncoderParamAdjust (&m_pEncContext, &sConfig)) { | |
| 754 | + return cmInitParaError; | |
| 755 | + } | |
| 754 | 756 | } |
| 755 | 757 | break; |
| 756 | 758 | case ENCODER_OPTION_FRAME_RATE: { // Maximal input frame rate |
| @@ -880,7 +882,9 @@ int CWelsH264SVCEncoder::SetOption (ENCODER_OPTION eOptionId, void* pOption) { · 123 unmodified lines | ||
| 880 | 882 | break; |
| 881 | 883 | case ENCODER_OPTION_LTR: { |
| 882 | 884 | SLTRConfig* pLTRValue = ((SLTRConfig*) (pOption)); |
| 883 | − WelsEncoderApplyLTR (&m_pWelsTrace->m_sLogCtx, &m_pEncContext, pLTRValue); | |
| 885 | + if (WelsEncoderApplyLTR (&m_pWelsTrace->m_sLogCtx, &m_pEncContext, pLTRValue)) { | |
| 886 | + return cmInitParaError; | |
| 887 | + } | |
| 884 | 888 | } |
| 885 | 889 | break; |
| 886 | 890 | case ENCODER_OPTION_ENABLE_SSEI: { |