Index: branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 359)
+++ branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 360)
@@ -414,5 +414,12 @@
   }
 #endif
+#ifdef SPS_PTL_FIX
+  if (pcSPS->getLayerId() == 0)
+  {
+    codePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1);
+  }
+#else
   codePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1);
+#endif
   WRITE_UVLC( pcSPS->getSPSId (),                   "sps_seq_parameter_set_id" );
   WRITE_UVLC( pcSPS->getChromaFormatIdc (),         "chroma_format_idc" );
