Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1177)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1178)
@@ -247,5 +247,5 @@
   for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++)
   {
-#if USE_DPB_SIZE_TABLE
+#if SVC_EXTENSION
     if( m_commonDecoderParams->getTargetOutputLayerSetIdx() == 0 )
     {
@@ -264,5 +264,5 @@
   }
 
-#if USE_DPB_SIZE_TABLE
+#if SVC_EXTENSION
   if( m_commonDecoderParams->getTargetOutputLayerSetIdx() == 0 )
   {
@@ -274,12 +274,10 @@
     m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1( m_commonDecoderParams->getTargetOutputLayerSetIdx(), pcSlice->getVPS()->getLayerIdcForOls( pcSlice->getVPS()->getOutputLayerSetIdx( m_commonDecoderParams->getTargetOutputLayerSetIdx()), pcSlice->getLayerId() ), pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
   }
+
+  m_iMaxRefPicNum += 1; // it should be updated if more than 1 resampling picture is used
 #else
   m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer());     // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
 #endif
-
-#if SVC_EXTENSION
-  m_iMaxRefPicNum += 1; // it should be updated if more than 1 resampling picture is used
-#endif
-
+  
   if (m_cListPic.size() < (UInt)m_iMaxRefPicNum)
   {
@@ -2370,8 +2368,7 @@
     Window defaultDisplayWindow = pcSPS->getVuiParametersPresentFlag() ? pcSPS->getVuiParameters()->getDefaultDisplayWindow() : Window();
 
-    for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++) 
-    {
-#if USE_DPB_SIZE_TABLE
-      if( getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 )
+    for( Int temporalLayer=0; temporalLayer < MAX_TLAYER; temporalLayer++ ) 
+    {
+      if( m_commonDecoderParams->getTargetOutputLayerSetIdx() == 0 )
       {
         assert( this->getLayerId() == 0 );
@@ -2384,7 +2381,4 @@
         numReorderPics[temporalLayer] = vps->getMaxVpsNumReorderPics( getCommonDecoderParams()->getTargetOutputLayerSetIdx() , temporalLayer);
       }
-#else
-      numReorderPics[temporalLayer] = pcSPS->getNumReorderPics(temporalLayer);
-#endif
     }
 
