shithub: openh264

Download patch

ref: 5a845f97d30401d0a41bfebf03934a586ebcd0a3
parent: afe8a44d5bcaa6507ef4687fd69aa32ea2713ec5
parent: 5c064ed27529e0a96b52edd84f8ce31ed49a8b90
author: Licai Guo <[email protected]>
date: Tue Apr 22 11:15:25 EDT 2014

Merge pull request #731 from huili2/ec_dec_error

prevent from return if slice decoding error for EC

--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -1856,7 +1856,9 @@
             HandleReferenceLost (pCtx, pNalCur);
             WelsLog (pCtx, WELS_LOG_WARNING, "reference picture introduced by this frame is lost during transmission! uiTId: %d\n",
                      pNalCur->sNalHeaderExt.uiTemporalId);
-            return iRet;
+            if (pCtx->iErrorConMethod == ERROR_CON_DISABLE) {
+              return iRet;
+            }
           }
         }
 
@@ -1867,7 +1869,9 @@
           WelsLog (pCtx, WELS_LOG_WARNING, "DecodeCurrentAccessUnit() failed (%d) in frame: %d uiDId: %d uiQId: %d\n",
                    iRet, pSh->iFrameNum, iCurrIdD, iCurrIdQ);
           HandleReferenceLostL0 (pCtx, pNalCur);
-          return iRet;
+          if (pCtx->iErrorConMethod == ERROR_CON_DISABLE) {
+            return iRet;
+          }
         }
         if (bReconstructSlice)	{
           if (WelsDecodeConstructSlice (pCtx, pNalCur)) {
@@ -1923,8 +1927,10 @@
       if (uiNalRefIdc > 0) {
         iRet = WelsMarkAsRef (pCtx);
         if (iRet != ERR_NONE) {
-          pCtx->pDec = NULL;
-          return iRet;
+          if (pCtx->iErrorConMethod == ERROR_CON_DISABLE) {
+            pCtx->pDec = NULL;
+            return iRet;
+          }
         }
         ExpandReferencingPicture (pCtx->pDec, pCtx->sExpandPicFunc.pExpandLumaPicture,
                                   pCtx->sExpandPicFunc.pExpandChromaPicture);