             return len + pointerField;
         };
     }
-}+}

            if (_data) {
                _read_position = _data.position;
                // finish reading TS fragment
                if (_data_complete && _data.bytesAvailable < 188) {
                    // free ByteArray
                    _data = null;
                    // first check if TS parsing was successful


        public static function probe(data : ByteArray) : Boolean {
            var pos : uint = data.position;
            var len : uint = Math.min(data.bytesAvailable, PACKETSIZE * 2);
            for (var i : int = 0; i < len; i++) {
                if (data.readByte() == SYNCBYTE) {
                    // ensure that at least two consecutive TS start offset are found
                    if (data.bytesAvailable > PACKETSIZE) {
                        data.position = pos + i + PACKETSIZE;
                        if (data.readByte() == SYNCBYTE) {
                            data.position = pos + i;
                            return true;
