Ticket #1099: SVN_HEVCSoftware_trunk_replace_parameter_set.patch

File SVN_HEVCSoftware_trunk_replace_parameter_set.patch, 1.0 KB (added by jackh, 11 years ago)
  • source/Lib/TLibDecoder/TDecTop.cpp

     
    623623  TComVPS* vps = new TComVPS();
    624624 
    625625  m_cEntropyDecoder.decodeVPS( vps );
    626   m_parameterSetManagerDecoder.storePrefetchedVPS(vps); 
     626  TComVPS* activeVPS=m_parameterSetManagerDecoder.getActiveVPS();
     627  if (activeVPS && vps->getVPSId()==activeVPS->getVPSId()) {
     628          delete vps;
     629  }
     630  else {
     631        m_parameterSetManagerDecoder.storePrefetchedVPS(vps); 
     632  }
     633 
    627634}
    628635
    629636Void TDecTop::xDecodeSPS()
    630637{
    631638  TComSPS* sps = new TComSPS();
    632639  m_cEntropyDecoder.decodeSPS( sps );
    633   m_parameterSetManagerDecoder.storePrefetchedSPS(sps);
     640  TComSPS* activeSPS=m_parameterSetManagerDecoder.getActiveSPS();
     641  if (activeSPS && sps->getSPSId()==activeSPS->getSPSId()) {
     642          delete sps;
     643  }
     644  else {
     645        m_parameterSetManagerDecoder.storePrefetchedSPS(sps);
     646  }
    634647}
    635648
    636649Void TDecTop::xDecodePPS()