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

@ -611,19 +611,8 @@ int SrsMpegtsOverUdp::connect()
// parse uri
if (!req) {
req = new SrsRequest();
size_t pos = string::npos;
string uri = req->tcUrl = output;
// tcUrl, stream
if ((pos = uri.rfind("/")) != string::npos) {
req->stream = uri.substr(pos + 1);
req->tcUrl = uri = uri.substr(0, pos);
}
srs_discovery_tc_url(req->tcUrl,
req->schema, req->host, req->vhost, req->app, req->port,
req->param);
srs_parse_rtmp_url(output, req->tcUrl, req->stream);
srs_discovery_tc_url(req->tcUrl, req->schema, req->host, req->vhost, req->app, req->port, req->param);
}
// connect host.