Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 978)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 980)
@@ -2133,7 +2133,15 @@
   }
 #endif
-  for(i = 1; i < vps->getMaxLayers(); i++)
-  {
-    for(j = 0; j < i; j++)
+#if VPS_FIX_TO_MATCH_SPEC
+  for (i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++)
+#else
+  for (i = 1; i < vps->getMaxLayers(); i++)
+#endif
+  {
+#if VPS_FIX_TO_MATCH_SPEC
+    for (j = vps->getBaseLayerInternalFlag() ? 0 : 1; j < i; j++)
+#else
+    for (j = 0; j < i; j++)
+#endif
     {
       if (vps->getDirectDependencyFlag(i, j))
