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 | #endif//REC_FRAME_COUNT | 750 | #endif//REC_FRAME_COUNT |
| 751 | 751 | ||
| 752 | /* Check every field whether there is new request for memory block changed or else, Oct. 24, 2008 */ | 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 | break; | 757 | break; |
| 756 | case ENCODER_OPTION_FRAME_RATE: { // Maximal input frame rate | 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 | break; | 882 | break; |
| 881 | case ENCODER_OPTION_LTR: { | 883 | case ENCODER_OPTION_LTR: { |
| 882 | SLTRConfig* pLTRValue = ((SLTRConfig*) (pOption)); | 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 | break; | 889 | break; |
| 886 | case ENCODER_OPTION_ENABLE_SSEI: { | 890 | case ENCODER_OPTION_ENABLE_SSEI: { |