solve green issue combined with EC and multi-packet input

This commit is contained in:
huili2
2014-07-14 22:03:36 -07:00
parent 4a518655a6
commit d7f3331c9d
4 changed files with 12 additions and 4 deletions

View File

@@ -83,6 +83,7 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const
iChromaSize = iPicChromaWidth * iPicChromaHeight;
pPic->pBuffer[0] = static_cast<uint8_t*> (WelsMalloc (iLumaSize /* luma */
+ (iChromaSize << 1) /* Cb,Cr */, "_pic->buffer[0]"));
memset (pPic->pBuffer[0], 128, (iLumaSize + (iChromaSize << 1)));
WELS_VERIFY_RETURN_PROC_IF (NULL, NULL == pPic->pBuffer[0], FreePicture (pPic));
pPic->iLinesize[0] = iPicWidth;