shithub: openh264

Download patch

ref: f946b24e635b3f2613ede41405c399c9b3685fc5
parent: 0c326fa3026f78fa94ad5c0e6888f597341a5996
parent: 78f3b5c5f6f58682d70872378b9aa64704d76435
author: HaiboZhu <[email protected]>
date: Fri May 16 08:40:48 EDT 2014

Merge pull request #854 from sijchen/bufferlencheck_fix

It is OK for this bug

--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -1285,7 +1285,7 @@
 
     fCompressRatioThr	= COMPRESS_RATIO_THR;
 
-    iLayerBsSize = WELS_ROUND (((3 * fDlp->iFrameWidth * fDlp->iFrameHeight) >> 1) * fCompressRatioThr);
+    iLayerBsSize = WELS_ROUND (((3 * fDlp->iFrameWidth * fDlp->iFrameHeight) >> 1) * fCompressRatioThr) + MAX_MACROBLOCK_SIZE_IN_BYTE;
     iLayerBsSize	= WELS_ALIGN (iLayerBsSize, 4);			// 4 bytes alinged
     iVclLayersBsSizeCount += iLayerBsSize;
     ++ iIndex;