             var sps : ByteArray = null;
             var pps : ByteArray = null;
             var overflow : Number;
+            var tag:Tag;
             var units : Vector.<VideoFrame>;
             for (var i : Number = 0; i < _videoPES.length; i++) {
                 // Parse the PES headers and NAL units.

                }
                // If NAL units are offset, push preceding data into the previous tag.
                overflow = units[0].start - units[0].header - _videoPES[i].payload;
                if (overflow && _videoTags.length > 0) {
                    _videoTags[_videoTags.length - 1].push(_videoPES[i].data, _videoPES[i].payload, overflow);
                }
                _videoTags.push(new Tag(Tag.AVC_NALU, _videoPES[i].pts, _videoPES[i].dts, false));
                // Only push NAL units 1 to 5 into tag.
                for (var j : Number = 0; j < units.length; j++) {
                    if (units[j].type < 6) {
                        _videoTags[_videoTags.length - 1].push(_videoPES[i].data, units[j].start, units[j].length);
                        // Unit type 5 indicates a keyframe.
                        if (units[j].type == 5) {
                            _videoTags[_videoTags.length - 1].keyframe = true;
                        }
                    } else if (units[j].type == 7) {
                        sps_found = true;

                if (_avcc.length == 0 && sps_found && pps_found) {
                    _avcc = AVC.getAVCC(sps, pps);
                }
                _videoTags.push(tag);
            }
        };

