From 9e8d8712fa515b69bf05feb923e087a4c9009de6 Mon Sep 17 00:00:00 2001
From: Seungwook Hong <seungwook.hong@nokia.com>
Date: Tue, 26 Jul 2022 05:28:02 +0000
Subject: [PATCH] Fix: initialize GOP list when GDR is enabled

---
 source/App/EncoderApp/EncAppCfg.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp
index 4cdaa2436..7ea5f1c7e 100644
--- a/source/App/EncoderApp/EncAppCfg.cpp
+++ b/source/App/EncoderApp/EncAppCfg.cpp
@@ -1731,6 +1731,13 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
 
     int8_t sliceType = m_GOPList[0].m_sliceType;
 
+    memset(m_GOPList, 0, sizeof(m_GOPList));
+    m_GOPList[0].m_sliceType = sliceType;
+    for (int i = 1; i < MAX_GOP; i++)
+    {
+      m_GOPList[i].m_POC = -1;
+    }
+
     m_GOPList[0].m_POC = 1;    
     m_GOPList[0].m_QPOffset = 0;
     m_GOPList[0].m_QPOffsetModelOffset = 0;
-- 
GitLab