shithub: openh264

Download patch

ref: e683d29f7cff72cf8d1f21ec58852766ebbccd46
parent: f280a71c3f300d5d42a563bc9ae21bff46a6d7aa
author: ruil2 <ruil2@cisco.com>
date: Tue Dec 26 11:06:17 EST 2017

skip frames when current frame is set as IDR because of scene change

--- a/codec/encoder/core/src/encoder.cpp
+++ b/codec/encoder/core/src/encoder.cpp
@@ -344,7 +344,7 @@
       bSceneChangeFlag = pEncCtx->pVaa->bSceneChangeFlag;
     }
     if (pEncCtx->pVaa->bIdrPeriodFlag || pParamInternal->bEncCurFrmAsIdrFlag || (!pSvcParam->bEnableLongTermReference
-        && bSceneChangeFlag)) {
+        && bSceneChangeFlag && !bSkipFrameFlag)) {
       iFrameType = videoFrameTypeIDR;
     } else if (pSvcParam->bEnableLongTermReference && (bSceneChangeFlag
                || pEncCtx->pVaa->eSceneChangeIdc == LARGE_CHANGED_SCENE)) {