Rename the decoder WelsMalloc to WelsMallocz
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.
This commit is contained in:
@@ -69,7 +69,7 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const
|
||||
int32_t iLumaSize = 0;
|
||||
int32_t iChromaSize = 0;
|
||||
|
||||
pPic = (PPicture) WelsMalloc (sizeof (SPicture), "PPicture");
|
||||
pPic = (PPicture) WelsMallocz (sizeof (SPicture), "PPicture");
|
||||
WELS_VERIFY_RETURN_IF (NULL, NULL == pPic);
|
||||
|
||||
memset (pPic, 0, sizeof (SPicture));
|
||||
@@ -82,7 +82,7 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const
|
||||
iLumaSize = iPicWidth * iPicHeight;
|
||||
iChromaSize = iPicChromaWidth * iPicChromaHeight;
|
||||
|
||||
pPic->pBuffer[0] = static_cast<uint8_t*> (WelsMalloc (iLumaSize /* luma */
|
||||
pPic->pBuffer[0] = static_cast<uint8_t*> (WelsMallocz (iLumaSize /* luma */
|
||||
+ (iChromaSize << 1) /* Cb,Cr */, "_pic->buffer[0]"));
|
||||
memset (pPic->pBuffer[0], 128, (iLumaSize + (iChromaSize << 1)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user