shithub: openh264

Download patch

ref: bffbde9f45bc0f21077109daf620811b7cc96ca8
parent: f003fa1fe67a6813421fb9749d38f75f116d4c04
parent: bb43c1c9a98e3d64b1ab8bb32a39f359d7a68197
author: dongzha <[email protected]>
date: Wed Sep 10 09:38:18 EDT 2014

Merge pull request #1342 from ruil2/update_pic

update spatial picture when abnormal exit

--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -3155,6 +3155,7 @@
 
     pCtx->pFuncList->pMarkPic (pCtx);
     if (!pCtx->pFuncList->pBuildRefList (pCtx, pCtx->iPOC, 0)) {
+      pCtx->pVpp->UpdateSpatialPictures (pCtx, pSvcParam, iCurTid, iDidIdx);
       // Force coding IDR as followed
       ForceCodingIDR (pCtx);
       WelsLog (pLogCtx, WELS_LOG_WARNING,
@@ -3425,6 +3426,7 @@
     // reference picture list update
     if (eNalRefIdc != NRI_PRI_LOWEST) {
       if (!pCtx->pFuncList->pUpdateRefList (pCtx)) {
+        pCtx->pVpp->UpdateSpatialPictures (pCtx, pSvcParam, iCurTid, iDidIdx);
         // Force coding IDR as followed
         ForceCodingIDR (pCtx);
         WelsLog (pLogCtx, WELS_LOG_WARNING, "WelsEncoderEncodeExt(), WelsUpdateRefList failed. ForceCodingIDR!");