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/core/src/au_parser.cpp (1 of 12 files). Show all
Unified · Split
| @@ -1111,7 +1111,7 @@ int32_t ParseSps (PWelsDecoderContext pCtx, PBitStringAux pBsAux, int32_t* pPicW · 1110 unmodified lines | ||
| 1111 | 1111 | |
| 1112 | 1112 | //re-write subset SPS to SPS |
| 1113 | 1113 | SBitStringAux sSubsetSpsBs; |
| 1114 | − uint8_t* pBsBuf = static_cast<uint8_t*> (WelsMalloc (SPS_PPS_BS_SIZE + 4, | |
| 1114 | + uint8_t* pBsBuf = static_cast<uint8_t*> (WelsMallocz (SPS_PPS_BS_SIZE + 4, | |
| 1115 | 1115 | "Temp buffer for parse only usage.")); //to reserve 4 bytes for UVLC writing buffer |
| 1116 | 1116 | if (NULL == pBsBuf) { |
| 1117 | 1117 | pCtx->iErrorCode |= dsOutOfMemory; |