From fba3af569b6945c0f4bf27a2cd782ef82ac83e89 Mon Sep 17 00:00:00 2001
From: biaowang <biao.wang@huawei.com>
Date: Fri, 10 Apr 2020 15:31:43 +0200
Subject: [PATCH] Fix #1008: reset previousSubPicIds list at the end of a
 picture

---
 source/Lib/DecoderLib/DecLib.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp
index a1f2a738c..231cf95a5 100644
--- a/source/Lib/DecoderLib/DecLib.cpp
+++ b/source/Lib/DecoderLib/DecLib.cpp
@@ -1654,6 +1654,7 @@ void DecLib::xCheckParameterSetConstraints(const int layerId)
       // store PPS ID to have sub-picture info for the next pictures when last rectangular slice in the picture is encountered
       if( slice->getSliceID() + 1 == pps->getNumSlicesInPic() )
       {
+        previousSubPicIds[layerId].clear();
         for( int subPicIdx = 0; subPicIdx < sps->getNumSubPics(); subPicIdx++ )
         {
           previousSubPicIds[layerId].push_back( pps->getSubPic( subPicIdx ).getSubPicID() );
-- 
GitLab