 
         /** H264 NAL unit names. **/
         public static const NAMES:Array = [
-            'Unspecified',
-            'NDR',
-            'Partition A',
-            'Partition B',
-            'Partition C',
-            'IDR',
-            'SEI',
-            'SPS',
-            'PPS',
-            'AUD',
-            'End of Sequence',
-            'End of Stream',
-            'Filler Data'
+            'Unspecified',                  // 0
+            'NDR',                          // 1
+            'Partition A',                  // 2
+            'Partition B',                  // 3
+            'Partition C',                  // 4
+            'IDR',                          // 5
+            'SEI',                          // 6
+            'SPS',                          // 7
+            'PPS',                          // 8
+            'AUD',                          // 9
+            'End of Sequence',              // 10
+            'End of Stream',                // 11
+            'Filler Data'                   // 12
         ];
         /** H264 profiles. **/
         public static const PROFILES:Object = {

                window = nalu.readUnsignedInt();
                // Match four-byte startcodes
                if((window & 0xFFFFFFFF) == 0x01) {
                    if(unit_start) {
                        units.push({
                            length: nalu.position - 4 - unit_start,
                            start: unit_start,

                    if(unit_type == 1 || unit_type == 5) { break; }
                // Match three-byte startcodes
                } else if((window & 0xFFFFFF00) == 0x100) {
                    // push previous NAL unit if new start delimiter found, dont push unit with type = 0
                    if(unit_start && unit_type) {
                        units.push({
                            header: unit_header,
                            length: nalu.position - 4 - unit_start,
