mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
use system utility for string finds
This commit is contained in:
parent
ca73534d7e
commit
d9f991ed2f
16 changed files with 111 additions and 112 deletions
|
@ -464,16 +464,9 @@ int srs_librtmp_context_parse_uri(Context* context)
|
|||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
// parse uri
|
||||
size_t pos = string::npos;
|
||||
string uri = context->url;
|
||||
// tcUrl, stream
|
||||
if ((pos = uri.rfind("/")) != string::npos) {
|
||||
context->stream = uri.substr(pos + 1);
|
||||
context->tcUrl = uri = uri.substr(0, pos);
|
||||
}
|
||||
|
||||
std::string schema;
|
||||
|
||||
srs_parse_rtmp_url(context->url, context->tcUrl, context->stream);
|
||||
srs_discovery_tc_url(context->tcUrl,
|
||||
schema, context->host, context->vhost, context->app, context->port,
|
||||
context->param);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue