mirror of
				https://github.com/ossrs/srs.git
				synced 2025-03-09 15:49:59 +00:00 
			
		
		
		
	Always use string instance to avoid crash risk. 3.0.95
This commit is contained in:
		
							parent
							
								
									b794c9e4ec
								
							
						
					
					
						commit
						10464a5fbe
					
				
					 15 changed files with 119 additions and 14 deletions
				
			
		|  | @ -110,12 +110,12 @@ void srs_mp4_delimiter_newline(stringstream& ss, SrsMp4DumpContext dc) | |||
|     srs_mp4_padding(ss, dc); | ||||
| } | ||||
| 
 | ||||
| int srs_mp4_string_length(const string& v) | ||||
| int srs_mp4_string_length(string v) | ||||
| { | ||||
|     return (int)v.length()+1; | ||||
| } | ||||
| 
 | ||||
| void srs_mp4_string_write(SrsBuffer* buf, const string& v) | ||||
| void srs_mp4_string_write(SrsBuffer* buf, string v) | ||||
| { | ||||
|     if (!v.empty()) { | ||||
|         buf->write_bytes((char*)v.data(), (int)v.length()); | ||||
|  |  | |||
|  | @ -56,7 +56,7 @@ extern std::string srs_dns_resolve(std::string host, int& family); | |||
| 
 | ||||
| // Split the host:port to host and port.
 | ||||
| // @remark the hostport format in <host[:port]>, where port is optional.
 | ||||
| extern void srs_parse_hostport(const std::string& hostport, std::string& host, int& port); | ||||
| extern void srs_parse_hostport(std::string hostport, std::string& host, int& port); | ||||
| 
 | ||||
| // Parse the endpoint to ip and port.
 | ||||
| // @remark The hostport format in <[ip:]port>, where ip is default to "0.0.0.0".
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue