From 065e9f84de4e1c3a783572e8a4b2b4740ea62756 Mon Sep 17 00:00:00 2001 From: Seungwook Hong <seungwook.hong@nokia.com> Date: Mon, 15 Mar 2021 17:44:33 -0700 Subject: [PATCH] JVET-U0097: use getNumRefIdx() rather than constant 4 --- source/Lib/DecoderLib/DecLib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index 54a0abb81..83bc7ae5f 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -2785,7 +2785,7 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl { for (int e = 0; e < 2; e++) { - for (int ridx = 0; ridx < 4; ridx++) + for (int ridx = 0; ridx < pcSlice->getNumRefIdx((RefPicList)e); ridx++) { Picture *pic = pcSlice->getRefPic((RefPicList)e, ridx); if (pic) -- GitLab