shithub: openh264

Download patch

ref: fd45e7ff155cdd0a26d792a699c533e23ebb2ad0
parent: 24823621e1de9a7a73aa21ca5373be25503a0c58
author: huili2 <huili2@cisco.com>
date: Mon Nov 10 12:56:26 EST 2014

EC UT fail bug fix

--- a/test/decoder/DecUT_ErrorConcealment.cpp
+++ b/test/decoder/DecUT_ErrorConcealment.cpp
@@ -47,8 +47,8 @@
     return 1;
   memset (pECCtx, 0, sizeof (SECInputCtx));
 
-  pECCtx->iMbWidth = rand() % MAX_MB_WIDTH; //give a constrained max width
-  pECCtx->iMbHeight = rand() % MAX_MB_HEIGHT; //give a constrained max height
+  pECCtx->iMbWidth = rand() % (MAX_MB_WIDTH - 1) + 1; //give a constrained max width
+  pECCtx->iMbHeight = rand() % (MAX_MB_HEIGHT - 1) + 1; //give a constrained max height
   pECCtx->iLinesize[0] = pECCtx->iMbWidth << 4;
   pECCtx->iLinesize[1] = pECCtx->iLinesize[2] = pECCtx->iLinesize[0] >> 1;