diff --git a/source/Lib/DecoderLib/DecLib.cpp b/source/Lib/DecoderLib/DecLib.cpp index 6452ff0afb40a1a09e7fd62ae7d4ce127396e0bf..bbe7e403452c0d81eebd247087cb471f28d0e9bb 100644 --- a/source/Lib/DecoderLib/DecLib.cpp +++ b/source/Lib/DecoderLib/DecLib.cpp @@ -2107,9 +2107,9 @@ bool DecLib::xDecodeSlice(InputNALUnit &nalu, int &iSkipFrame, int iPOCLastDispl m_accessUnitNoOutputPriorPicFlags.push_back(m_apcSlicePilot->getNoOutputOfPriorPicsFlag()); } - if (m_picHeader.getGdrPicFlag()) + if (m_picHeader.getGdrPicFlag() && m_prevGDRInSameLayerPOC[nalu.m_nuhLayerId] == -MAX_INT ) // Only care about recovery POC if it is the first coded GDR picture in the layer { - m_prevGDRInSameLayerRecoveryPOC[nalu.m_nuhLayerId] = m_picHeader.getRecoveryPocCnt(); + m_prevGDRInSameLayerRecoveryPOC[nalu.m_nuhLayerId] = m_apcSlicePilot->getPOC() + m_picHeader.getRecoveryPocCnt(); } PPS *pps = m_parameterSetManager.getPPS(m_picHeader.getPPSId()); diff --git a/source/Lib/DecoderLib/DecLib.h b/source/Lib/DecoderLib/DecLib.h index 3c02b7ead1e01aeab59c0657bcc9b7cbdd4e894f..9b53f1d62bfc7f0b4f5ab48d2bda12ec3ede0d42 100644 --- a/source/Lib/DecoderLib/DecLib.h +++ b/source/Lib/DecoderLib/DecLib.h @@ -230,7 +230,7 @@ public: void updateAssociatedIRAP(); void updatePrevGDRInSameLayer(); void updatePrevIRAPAndGDRSubpic(); - bool getGDRRecoveryPocReached() { return ( m_pcPic->getPOC() >= m_prevGDRInSameLayerPOC[m_pcPic->layerId] + m_prevGDRInSameLayerRecoveryPOC[m_pcPic->layerId] ); } + bool getGDRRecoveryPocReached() { return ( m_pcPic->getPOC() >= m_prevGDRInSameLayerRecoveryPOC[m_pcPic->layerId] ); } #if JVET_S0078_NOOUTPUTPRIORPICFLAG bool getAudIrapOrGdrAuFlag() const { return m_audIrapOrGdrAuFlag; }