This function actually zero-initializes the allocated memory, thus make this clear in the function name. This makes the function name match the same behaviour in the encoder.
Showing the changes to codec/decoder/plus/src/welsDecoderExt.cpp (1 of 12 files). Show all
Unified · Split
| @@ -240,7 +240,7 @@ int32_t CWelsDecoder::InitDecoder (const bool bParseOnly) { · 239 unmodified lines | |||
| 240 | 240 | ||
| 241 | if (m_pDecContext) //free | 241 | if (m_pDecContext) //free |
| 242 | UninitDecoder(); | 242 | UninitDecoder(); |
| 243 | m_pDecContext = (PWelsDecoderContext)WelsMalloc (sizeof (SWelsDecoderContext), "m_pDecContext"); | 243 | m_pDecContext = (PWelsDecoderContext)WelsMallocz (sizeof (SWelsDecoderContext), "m_pDecContext"); |
| 244 | if (NULL == m_pDecContext) | 244 | if (NULL == m_pDecContext) |
| 245 | return cmMallocMemeError; | 245 | return cmMallocMemeError; |
| 246 | 246 | ||