1
0
Fork 0
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:
winlin 2015-10-13 16:06:37 +08:00
parent ca73534d7e
commit d9f991ed2f
16 changed files with 111 additions and 112 deletions

View file

@ -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);