winlin

fix the parse rtmp url bug for ingest.

@@ -356,10 +356,11 @@ int SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective* vhost, S @@ -356,10 +356,11 @@ int SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective* vhost, S
356 356
357 // find the app and stream in rtmp url 357 // find the app and stream in rtmp url
358 std::string app, stream; 358 std::string app, stream;
359 - srs_parse_rtmp_url(output, app, stream);  
360 - size_t pos;  
361 - if ((pos = app.rfind("?")) != std::string::npos) {  
362 - app = app.substr(0, pos); 359 + if (true) {
  360 + int port = SRS_CONSTS_RTMP_DEFAULT_PORT;
  361 + std::string tcUrl, schema, host, vhost2, param;
  362 + srs_parse_rtmp_url(output, tcUrl, stream);
  363 + srs_discovery_tc_url(tcUrl, schema, host, vhost2, app, port, param);
363 } 364 }
364 365
365 std::string log_file = SRS_CONSTS_NULL_FILE; // disabled 366 std::string log_file = SRS_CONSTS_NULL_FILE; // disabled
@@ -122,6 +122,9 @@ int SrsProcess::start() @@ -122,6 +122,9 @@ int SrsProcess::start()
122 return ret; 122 return ret;
123 } 123 }
124 124
  125 + // for osx(lldb) to debug the child process.
  126 + //kill(0, SIGSTOP);
  127 +
125 // child process: ffmpeg encoder engine. 128 // child process: ffmpeg encoder engine.
126 if (pid == 0) { 129 if (pid == 0) {
127 // ignore the SIGINT and SIGTERM 130 // ignore the SIGINT and SIGTERM