1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix the parse rtmp url bug for ingest.

This commit is contained in:
winlin 2015-11-02 13:37:44 +08:00
parent e3407c1dd2
commit 4b5eb5ea2d
2 changed files with 8 additions and 4 deletions

View file

@ -356,10 +356,11 @@ int SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective* vhost, S
// find the app and stream in rtmp url // find the app and stream in rtmp url
std::string app, stream; std::string app, stream;
srs_parse_rtmp_url(output, app, stream); if (true) {
size_t pos; int port = SRS_CONSTS_RTMP_DEFAULT_PORT;
if ((pos = app.rfind("?")) != std::string::npos) { std::string tcUrl, schema, host, vhost2, param;
app = app.substr(0, pos); srs_parse_rtmp_url(output, tcUrl, stream);
srs_discovery_tc_url(tcUrl, schema, host, vhost2, app, port, param);
} }
std::string log_file = SRS_CONSTS_NULL_FILE; // disabled std::string log_file = SRS_CONSTS_NULL_FILE; // disabled

View file

@ -122,6 +122,9 @@ int SrsProcess::start()
return ret; return ret;
} }
// for osx(lldb) to debug the child process.
//kill(0, SIGSTOP);
// child process: ffmpeg encoder engine. // child process: ffmpeg encoder engine.
if (pid == 0) { if (pid == 0) {
// ignore the SIGINT and SIGTERM // ignore the SIGINT and SIGTERM