shithub: openh264

Download patch

ref: a87c15361223d536a95ddb4fe9490464790ee9d8
parent: 2c2043aa158806a228309b9a0df6fab0d2b87600
parent: 12464197a58786e59a2f022227372012d5cebd4b
author: huili2 <huili2@cisco.com>
date: Tue Sep 8 05:47:12 EDT 2020

Merge pull request #3331 from xiaotianshi2/thread-decoding-framecrop-issue

fix thread-decoding: frame-cropping information is not transferred to other threads in time.

--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -1386,6 +1386,9 @@
   } else if (bPicBuffChanged) {
     InitialDqLayersContext (sThreadCtx.pCtx, sThreadCtx.pCtx->pSps->iMbWidth << 4, sThreadCtx.pCtx->pSps->iMbHeight << 4);
   }
+  if (!sThreadCtx.pCtx->bNewSeqBegin && m_pLastDecThrCtx != NULL) {
+    sThreadCtx.pCtx->sFrameCrop = m_pLastDecThrCtx->pCtx->pSps->sFrameCrop;
+  }
   m_bParamSetsLostFlag = sThreadCtx.pCtx->bNewSeqBegin ? false : sThreadCtx.pCtx->bParamSetsLostFlag;
   m_bFreezeOutput = sThreadCtx.pCtx->bNewSeqBegin ? false : sThreadCtx.pCtx->bFreezeOutput;
   return (DECODING_STATE)iErr;