Changeset 1509 in SHVCSoftware for branches/SHM-dev/source/App


Ignore:
Timestamp:
12 Dec 2015, 03:55:59 (9 years ago)
Author:
seregin
Message:

correct VPS setting, memory leak fix

Location:
branches/SHM-dev/source/App/TAppEncoder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r1501 r1509  
    182182  for( Int layer = 0; layer < m_numLayers; layer++ )
    183183  {
    184     if( m_apcLayerCfg[layer]->m_numSamplePredRefLayers > 0 )
    185     {
    186       delete [] m_apcLayerCfg[layer]->m_samplePredRefLayerIds;
    187       m_apcLayerCfg[layer]->m_samplePredRefLayerIds = NULL;
    188     }
    189     if( m_apcLayerCfg[layer]->m_numMotionPredRefLayers > 0 )
    190     {
    191       delete [] m_apcLayerCfg[layer]->m_motionPredRefLayerIds;
    192       m_apcLayerCfg[layer]->m_motionPredRefLayerIds = NULL;
    193     }
    194     if( m_apcLayerCfg[layer]->m_numActiveRefLayers > 0 )
    195     {
    196       delete [] m_apcLayerCfg[layer]->m_predLayerIds;
    197       m_apcLayerCfg[layer]->m_predLayerIds = NULL;
    198     }
    199184    if( m_apcLayerCfg[layer] )
    200185    {
     
    26322617#endif
    26332618    Int* m_aiPad                    = m_apcLayerCfg[layer]->m_aiPad;
    2634     Int* m_aidQP                    = m_apcLayerCfg[layer]->m_aidQP;
     2619    Int*& m_aidQP                   = m_apcLayerCfg[layer]->m_aidQP;
    26352620
    26362621    Int& m_iSourceWidth             = m_apcLayerCfg[layer]->m_iSourceWidth;
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp

    r1487 r1509  
    6060TAppEncLayerCfg::~TAppEncLayerCfg()
    6161{
    62   if ( m_aidQP )
     62  if( m_numSamplePredRefLayers > 0 )
    6363  {
    64     delete[] m_aidQP;
     64    delete [] m_samplePredRefLayerIds;
     65    m_samplePredRefLayerIds = NULL;
     66  }
     67
     68  if( m_numMotionPredRefLayers > 0 )
     69  {
     70    delete [] m_motionPredRefLayerIds;
     71    m_motionPredRefLayerIds = NULL;
     72  }
     73
     74  if( m_numActiveRefLayers > 0 )
     75  {
     76    delete [] m_predLayerIds;
     77    m_predLayerIds = NULL;
     78  }
     79
     80  if( m_aidQP )
     81  {
     82    delete [] m_aidQP;
    6583  }
    6684}
Note: See TracChangeset for help on using the changeset viewer.