Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1292)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1295)
@@ -1168,5 +1168,5 @@
 }
 
-Void TDecCavlc::parseSliceHeader (TComSlice* pcSlice, ParameterSetManager *parameterSetManager)
+Void TDecCavlc::parseSliceHeader (TComSlice* pcSlice, ParameterSetManager *parameterSetManager, const Int prevTid0POC)
 {
   UInt  uiCode;
@@ -1324,5 +1324,5 @@
       Int iPOClsb = uiCode;
 #endif
-      Int iPrevPOC = pcSlice->getPrevTid0POC();
+      Int iPrevPOC = prevTid0POC;
       Int iMaxPOClsb = 1<< sps->getBitsForPOC();
       Int iPrevPOClsb = iPrevPOC & (iMaxPOClsb - 1);
Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1292)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1295)
@@ -85,5 +85,5 @@
   Void  parseProfileTier    (ProfileTierLevel *ptl, const Bool bIsSubLayer);
   Void  parseHrdParameters  (TComHRD *hrd, Bool cprms_present_flag, UInt tempLevelHigh);
-  Void  parseSliceHeader    ( TComSlice* pcSlice, ParameterSetManager *parameterSetManager);
+  Void  parseSliceHeader    ( TComSlice* pcSlice, ParameterSetManager *parameterSetManager, const Int prevTid0POC);
   Void  parseTerminatingBit ( UInt& ruiBit );
   Void  parseRemainingBytes ( Bool noTrailingBytesExpected );
Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecEntropy.h
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecEntropy.h	(revision 1292)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecEntropy.h	(revision 1295)
@@ -77,5 +77,5 @@
 #endif
 
-  virtual Void parseSliceHeader          ( TComSlice* pcSlice, ParameterSetManager *parameterSetManager)       = 0;
+  virtual Void parseSliceHeader          ( TComSlice* pcSlice, ParameterSetManager *parameterSetManager, const Int prevTid0POC)       = 0;
 
   virtual Void parseTerminatingBit       ( UInt& ruilsLast )                                     = 0;
@@ -150,5 +150,5 @@
   Void    decodePPS                   ( TComPPS* pcPPS ) { m_pcEntropyDecoderIf->parsePPS(pcPPS); }
 #endif
-  Void    decodeSliceHeader           ( TComSlice* pcSlice, ParameterSetManager *parameterSetManager)  { m_pcEntropyDecoderIf->parseSliceHeader(pcSlice, parameterSetManager);         }
+  Void    decodeSliceHeader           ( TComSlice* pcSlice, ParameterSetManager *parameterSetManager, const Int prevTid0POC)  { m_pcEntropyDecoderIf->parseSliceHeader(pcSlice, parameterSetManager, prevTid0POC);         }
 
   Void    decodeTerminatingBit        ( UInt& ruiIsLast )       { m_pcEntropyDecoderIf->parseTerminatingBit(ruiIsLast);     }
Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.h	(revision 1292)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.h	(revision 1295)
@@ -79,11 +79,11 @@
   Void  parseVPS                  ( TComVPS* /*pcVPS*/ ) {}
   Void  parseSPS                  ( TComSPS* /*pcSPS*/ ) {}
-  Void  parsePPS                  ( TComPPS* /*pcPPS*/ 
 #if CGS_3D_ASYMLUT
-    , TCom3DAsymLUT * /*pc3DAsymLUT*/ , Int /*nLayerID*/
+  Void  parsePPS                  ( TComPPS* /*pcPPS*/, TCom3DAsymLUT * /*pc3DAsymLUT*/, Int /*nLayerID*/ ) {}
+#else
+  Void  parsePPS                  ( TComPPS* /*pcPPS*/ ) {}
 #endif
-    ) {}
 
-  Void  parseSliceHeader          ( TComSlice* /*pcSlice*/, ParameterSetManager* /*parameterSetManager*/) {}
+  Void  parseSliceHeader          ( TComSlice* /*pcSlice*/, ParameterSetManager* /*parameterSetManager*/, const Int /*prevTid0POC*/) {}
   Void  parseTerminatingBit       ( UInt& ruiBit );
   Void  parseRemainingBytes       ( Bool noTrailingBytesExpected);
Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1292)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1295)
@@ -82,4 +82,5 @@
   m_prevPOC                = MAX_INT;
 #endif
+  m_prevTid0POC            = 0;
   m_bFirstSliceInPicture    = true;
 #if !SVC_EXTENSION
@@ -399,4 +400,5 @@
   cFillPic->getSlice(0)->setReferenced(true);
   cFillPic->getSlice(0)->setPOC(iLostPoc);
+  xUpdatePreviousTid0POC(cFillPic->getSlice(0));
   cFillPic->setReconMark(true);
   cFillPic->setOutputMark(true);
@@ -749,5 +751,5 @@
 #endif
 
-  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManager);
+  m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManager, m_prevTid0POC);
 
 #if SVC_EXTENSION
@@ -841,7 +843,9 @@
     Int iMaxPOClsb = 1 << sps->getBitsForPOC();
     m_apcSlicePilot->setPOC( m_apcSlicePilot->getPOC() & (iMaxPOClsb - 1) );
+    xUpdatePreviousTid0POC(m_apcSlicePilot);
   }
 
   // Skip pictures due to random access
+
   if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay))
   {
Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 1292)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h	(revision 1295)
@@ -106,4 +106,5 @@
   Int                     m_prevPOC;
 #endif
+  Int                     m_prevTid0POC;
   Bool                    m_bFirstSliceInPicture;
 #if !SVC_EXTENSION
@@ -284,4 +285,6 @@
 #endif
   Void      xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType );
+  Void      xUpdatePreviousTid0POC( TComSlice *pSlice ) { if ((pSlice->getTLayer()==0) && (pSlice->isReferenceNalu() && (pSlice->getNalUnitType()!=NAL_UNIT_CODED_SLICE_RASL_R)&& (pSlice->getNalUnitType()!=NAL_UNIT_CODED_SLICE_RADL_R))) { m_prevTid0POC=pSlice->getPOC(); } }
+
 
 #if SVC_EXTENSION
