This reverts commit 27172bafd7ff2cc80b08768a32a23470f3d6d3fd, reversing changes made to 24916a652ee5d3e36d931c222df20966f7c158fa.
Showing the changes to codec/decoder/plus/src (1 of 11 files). Show all
Unified · Split
| @@ -243,7 +243,6 @@ int32_t CWelsDecoder::InitDecoder (const SDecodingParam* pParam) { · 242 unmodified lines | ||
| 243 | 243 | "CWelsDecoder::init_decoder(), openh264 codec version = %s, ParseOnly = %d", |
| 244 | 244 | VERSION_NUMBER, (int32_t)pParam->bParseOnly); |
| 245 | 245 | |
| 246 | − //reset decoder context | |
| 247 | 246 | if (m_pDecContext) //free |
| 248 | 247 | UninitDecoder(); |
| 249 | 248 | m_pDecContext = (PWelsDecoderContext)WelsMallocz (sizeof (SWelsDecoderContext), "m_pDecContext"); |
| @@ -253,8 +252,8 @@ int32_t CWelsDecoder::InitDecoder (const SDecodingParam* pParam) { · 3 unmodified lines | ||
| 253 | 252 | m_pDecContext->pMemAlign = new CMemoryAlign (iCacheLineSize); |
| 254 | 253 | WELS_VERIFY_RETURN_PROC_IF (1, (NULL == m_pDecContext->pMemAlign), UninitDecoder()) |
| 255 | 254 | |
| 256 | − //fill in default value into context | |
| 257 | − WelsDecoderDefaults (m_pDecContext, &m_pWelsTrace->m_sLogCtx); | |
| 255 | + WELS_VERIFY_RETURN_PROC_IF (cmInitParaError, WelsInitDecoder (m_pDecContext, pParam->bParseOnly, | |
| 256 | + &m_pWelsTrace->m_sLogCtx), UninitDecoder()) | |
| 258 | 257 | |
| 259 | 258 | //check param and update decoder context |
| 260 | 259 | m_pDecContext->pParam = (SDecodingParam*) m_pDecContext->pMemAlign->WelsMallocz (sizeof (SDecodingParam), |
| @@ -263,9 +262,6 @@ int32_t CWelsDecoder::InitDecoder (const SDecodingParam* pParam) { · 2 unmodified lines | ||
| 263 | 262 | int32_t iRet = DecoderConfigParam (m_pDecContext, pParam); |
| 264 | 263 | WELS_VERIFY_RETURN_IFNEQ (iRet, cmResultSuccess); |
| 265 | 264 | |
| 266 | − //init decoder | |
| 267 | − WELS_VERIFY_RETURN_PROC_IF (cmInitParaError, WelsInitDecoder (m_pDecContext, &m_pWelsTrace->m_sLogCtx), UninitDecoder()) | |
| 268 | − | |
| 269 | 265 | return cmResultSuccess; |
| 270 | 266 | } |
| 271 | 267 | |
| @@ -295,7 +291,7 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) { · 23 unmodified lines | ||
| 295 | 291 | return dsInitialOptExpected; |
| 296 | 292 | |
| 297 | 293 | if (eOptID == DECODER_OPTION_DATAFORMAT) { // Set color space of decoding output frame |
| 298 | − if (m_pDecContext->pParam->bParseOnly) { | |
| 294 | + if (m_pDecContext->bParseOnly) { | |
| 299 | 295 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_WARNING, |
| 300 | 296 | "CWelsDecoder::SetOption for data format meaningless for parseonly."); |
| 301 | 297 | return cmResultSuccess; |
| @@ -322,7 +318,7 @@ long CWelsDecoder::SetOption (DECODER_OPTION eOptID, void* pOption) { · 20 unmodified lines | ||
| 322 | 318 | iVal = * ((int*)pOption); // int value for error concealment idc |
| 323 | 319 | iVal = WELS_CLIP3 (iVal, (int32_t) ERROR_CON_DISABLE, (int32_t) ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE); |
| 324 | 320 | m_pDecContext->pParam->eEcActiveIdc = m_pDecContext->eErrorConMethod = (ERROR_CON_IDC) iVal; |
| 325 | − if ((m_pDecContext->pParam->bParseOnly) && (m_pDecContext->eErrorConMethod != ERROR_CON_DISABLE)) { | |
| 321 | + if ((m_pDecContext->bParseOnly) && (m_pDecContext->eErrorConMethod != ERROR_CON_DISABLE)) { | |
| 326 | 322 | WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, |
| 327 | 323 | "CWelsDecoder::SetOption for ERROR_CON_IDC = %d not allowd for parse only!.", iVal); |
| 328 | 324 | return cmInitParaError; |