Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 3 files). Show all
Unified · Split
| @@ -127,9 +127,10 @@ static void DestroyPicBuff (PPicBuff* ppPicBuf) { · 126 unmodified lines | ||
| 127 | 127 | /* |
| 128 | 128 | * fill data fields in default for decoder context |
| 129 | 129 | */ |
| 130 | −void WelsDecoderDefaults (PWelsDecoderContext pCtx) { | |
| 130 | +void WelsDecoderDefaults (PWelsDecoderContext pCtx, SLogContext* pLogCtx) { | |
| 131 | 131 | int32_t iCpuCores = 1; |
| 132 | 132 | memset (pCtx, 0, sizeof (SWelsDecoderContext)); // fill zero first |
| 133 | + pCtx->sLogCtx = *pLogCtx; | |
| 133 | 134 | |
| 134 | 135 | pCtx->pArgDec = NULL; |
| 135 | 136 | |
| @@ -350,13 +351,13 @@ int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const SDecodingParam* kpPa · 214 unmodified lines | ||
| 350 | 351 | * \note N/A |
| 351 | 352 | ************************************************************************************* |
| 352 | 353 | */ |
| 353 | −int32_t WelsInitDecoder (PWelsDecoderContext pCtx) { | |
| 354 | +int32_t WelsInitDecoder (PWelsDecoderContext pCtx, SLogContext* pLogCtx) { | |
| 354 | 355 | if (pCtx == NULL) { |
| 355 | 356 | return ERR_INFO_INVALID_PTR; |
| 356 | 357 | } |
| 357 | 358 | |
| 358 | 359 | // default |
| 359 | − WelsDecoderDefaults (pCtx); | |
| 360 | + WelsDecoderDefaults (pCtx, pLogCtx); | |
| 360 | 361 | |
| 361 | 362 | // open decoder |
| 362 | 363 | WelsOpenDecoder (pCtx); |