From 888cebaee5ca1d003234ce92225f018e4ab1689e Mon Sep 17 00:00:00 2001
From: yaswanthsastry <yaswanth.sastry@multicorewareinc.com>
Date: Wed, 26 Apr 2023 15:29:31 +0530
Subject: [PATCH] Reflecting Zonefile Parameters inside Lookahead.

---
 source/encoder/slicetype.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/source/encoder/slicetype.cpp b/source/encoder/slicetype.cpp
index 550cc1872..450f998f6 100644
--- a/source/encoder/slicetype.cpp
+++ b/source/encoder/slicetype.cpp
@@ -1466,6 +1466,14 @@ void Lookahead::slicetypeDecide()
 
         Frame *curFrame = m_inputQueue.first();
         int j;
+		if (m_param->bResetZoneConfig)
+		{
+			for (int i = 0; i < m_param->rc.zonefileCount; i++)
+			{
+				if (m_param->rc.zones[i].startFrame == curFrame->m_poc)
+					m_param = m_param->rc.zones[i].zoneParam;
+			}
+		}
         for (j = 0; j < m_param->bframes + 2; j++)
         {
             if (!curFrame) break;
-- 
2.37.3.windows.1

