From 91ca8047c0f1d0a54e56f8400187919e115cdca7 Mon Sep 17 00:00:00 2001
From: Remy Foray <remy.foray@allegrodvt.com>
Date: Mon, 11 May 2020 11:39:54 +0200
Subject: [PATCH] Fix apsId derivation in checkAuApsContent()

---
 source/Lib/CommonLib/ParameterSetManager.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source/Lib/CommonLib/ParameterSetManager.h b/source/Lib/CommonLib/ParameterSetManager.h
index 40d5a9ddf..9f51cbb33 100644
--- a/source/Lib/CommonLib/ParameterSetManager.h
+++ b/source/Lib/CommonLib/ParameterSetManager.h
@@ -131,7 +131,7 @@ public:
 
   void checkAuApsContent( APS *aps, std::vector<int>& accessUnitApsNals )
   {
-    int apsId = ( aps->getAPSId() << NUM_APS_TYPE_LEN ) + (int)aps->getAPSType();
+    int apsId = aps->getAPSId() + MAX_NUM_APS * aps->getAPSType();
 
     if( std::find( accessUnitApsNals.begin(), accessUnitApsNals.end(), apsId ) != accessUnitApsNals.end() )
     {
-- 
GitLab