Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 1 file). Show all
Unified · Split
| @@ -264,7 +264,14 @@ int32_t CWelsDecoder::ResetDecoder() { · 263 unmodified lines | |||
| 264 | if (m_pDecContext != NULL && m_pWelsTrace != NULL) { | 264 | if (m_pDecContext != NULL && m_pWelsTrace != NULL) { |
| 265 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "ResetDecoder(), context error code is %d", | 265 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, "ResetDecoder(), context error code is %d", |
| 266 | m_pDecContext->iErrorCode); | 266 | m_pDecContext->iErrorCode); |
| 267 | return InitDecoder (m_pDecContext->bParseOnly); | 267 | SDecodingParam sPrevParam; |
| 268 | memcpy (&sPrevParam, m_pDecContext->pParam, sizeof (SDecodingParam)); | ||
| 269 | |||
| 270 | int32_t iRet = InitDecoder (m_pDecContext->bParseOnly); | ||
| 271 | if (iRet) | ||
| 272 | return iRet; | ||
| 273 | |||
| 274 | return DecoderConfigParam (m_pDecContext, &sPrevParam); | ||
| 268 | } else if (m_pWelsTrace != NULL) { | 275 | } else if (m_pWelsTrace != NULL) { |
| 269 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "ResetDecoder() failed as decoder context null"); | 276 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_ERROR, "ResetDecoder() failed as decoder context null"); |
| 270 | } | 277 | } |
| @@ -308,7 +315,7 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) { · 37 unmodified lines | |||
| 308 | 315 | ||
| 309 | iVal = * ((int*)pOption); // int value for error concealment idc | 316 | iVal = * ((int*)pOption); // int value for error concealment idc |
| 310 | iVal = WELS_CLIP3 (iVal, (int32_t) ERROR_CON_DISABLE, (int32_t) ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE); | 317 | iVal = WELS_CLIP3 (iVal, (int32_t) ERROR_CON_DISABLE, (int32_t) ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE); |
| 311 | m_pDecContext->eErrorConMethod = (ERROR_CON_IDC) iVal; | 318 | m_pDecContext->pParam->eEcActiveIdc = m_pDecContext->eErrorConMethod = (ERROR_CON_IDC) iVal; |
| 312 | if ((m_pDecContext->bParseOnly) && (m_pDecContext->eErrorConMethod != ERROR_CON_DISABLE)) { | 319 | if ((m_pDecContext->bParseOnly) && (m_pDecContext->eErrorConMethod != ERROR_CON_DISABLE)) { |
| 313 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, | 320 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, |
| 314 | "CWelsDecoder::SetOption for ERROR_CON_IDC = %d not allowd for parse only!.", iVal); | 321 | "CWelsDecoder::SetOption for ERROR_CON_IDC = %d not allowd for parse only!.", iVal); |