shithub: openh264

Download patch

ref: 12464197a58786e59a2f022227372012d5cebd4b
parent: f02cf48cae01ac087b41a5a125b3bc4f2c71f6a0
author: xiaotianshi2 <[email protected]>
date: Mon Sep 7 07:22:41 EDT 2020

fix thread-decoding: frame-cropping information is not transfered 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;