shithub: openh264

Download patch

ref: 7b9ae15482fd3963ea99805eb288ed722b04ff29
parent: 228ea1a668e99c7a0ce11518dea9b1d67c4fd125
parent: 1a58488aeb9ffc352914bffb84fdfc4cce10cc53
author: huili2 <huili2@cisco.com>
date: Wed Jul 9 05:33:06 EDT 2014

Merge pull request #1114 from huili2/GREY

new IDR inserted as GREY

--- a/codec/decoder/core/src/manage_dec_ref.cpp
+++ b/codec/decoder/core/src/manage_dec_ref.cpp
@@ -115,9 +115,9 @@
     if (pCtx->iErrorConMethod != ERROR_CON_DISABLE) { //IDR lost!, recover it for future decoding with data all set to 0
       PPicture pRef = PrefetchPic (pCtx->pPicBuff[0]);
       if (pRef != NULL) {
-        memset (pRef->pData[0], 0, pRef->iLinesize[0] * pRef->iHeightInPixel);
-        memset (pRef->pData[1], 0, pRef->iLinesize[1] * pRef->iHeightInPixel / 2);
-        memset (pRef->pData[2], 0, pRef->iLinesize[2] * pRef->iHeightInPixel / 2);
+        memset (pRef->pData[0], 128, pRef->iLinesize[0] * pRef->iHeightInPixel);
+        memset (pRef->pData[1], 128, pRef->iLinesize[1] * pRef->iHeightInPixel / 2);
+        memset (pRef->pData[2], 128, pRef->iLinesize[2] * pRef->iHeightInPixel / 2);
         pRef->iFrameNum = 0;
         pRef->iFramePoc = 0;
         pRef->uiTemporalId = pRef->uiQualityId = 0;