diff --git a/README.md b/README.md index ab0f41c19..a3177b080 100755 --- a/README.md +++ b/README.md @@ -233,6 +233,7 @@ Please select according to languages: ### V2 changes +* v2.0, 2018-02-28, Merge [#1077][bug #1077], fix crash for edge HLS. 2.0.247 * v2.0, 2018-02-13, Fix [#1059][bug #1059], support vhost in stream parameters. 2.0.246 * v2.0, 2018-01-07, Merge [#1045][bug #1045], fix [#1044][bug #1044], TCP connection alive detection. 2.0.245 * v2.0, 2018-01-04, Merge [#1039][bug #1039], fix bug of init.d script. @@ -1430,6 +1431,7 @@ Winlin [bug #1044]: https://github.com/ossrs/srs/issues/1044 [bug #1045]: https://github.com/ossrs/srs/issues/1045 [bug #1059]: https://github.com/ossrs/srs/issues/1059 +[bug #1077]: https://github.com/ossrs/srs/issues/1077 [bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx [bug #735]: https://github.com/ossrs/srs/issues/735 diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp index 56e440d09..f6dacc659 100644 --- a/trunk/src/app/srs_app_hls.cpp +++ b/trunk/src/app/srs_app_hls.cpp @@ -1011,7 +1011,7 @@ srs_error_t SrsHls::initialize(SrsOriginHub* h, SrsRequest* r) srs_error_t SrsHls::on_publish() { srs_error_t err = srs_success; - + // update the hls time, for hls_dispose. last_update_time = srs_get_system_time_ms(); diff --git a/trunk/src/app/srs_app_rtmp_conn.cpp b/trunk/src/app/srs_app_rtmp_conn.cpp index 86d4289d3..cee90deae 100644 --- a/trunk/src/app/srs_app_rtmp_conn.cpp +++ b/trunk/src/app/srs_app_rtmp_conn.cpp @@ -172,7 +172,7 @@ srs_error_t SrsRtmpConn::do_cycle() rtmp->set_recv_timeout(SRS_CONSTS_RTMP_TMMS); rtmp->set_send_timeout(SRS_CONSTS_RTMP_TMMS); - + if ((err = rtmp->handshake()) != srs_success) { return srs_error_wrap(err, "rtmp handshake"); } @@ -472,28 +472,28 @@ srs_error_t SrsRtmpConn::stream_service_cycle() req->strip(); srs_trace("client identified, type=%s, vhost=%s, app=%s, stream_name=%s, duration=%.2f", srs_client_type_string(info->type).c_str(), req->vhost.c_str(), req->app.c_str(), req->stream.c_str(), req->duration); - + // discovery vhost, resolve the vhost from config SrsConfDirective* parsed_vhost = _srs_config->get_vhost(req->vhost); if (parsed_vhost) { req->vhost = parsed_vhost->arg0(); } - + if (req->schema.empty() || req->vhost.empty() || req->port == 0 || req->app.empty()) { return srs_error_new(ERROR_RTMP_REQ_TCURL, "discovery tcUrl failed, tcUrl=%s, schema=%s, vhost=%s, port=%d, app=%s", req->tcUrl.c_str(), req->schema.c_str(), req->vhost.c_str(), req->port, req->app.c_str()); } - + // check vhost, allow default vhost. if ((err = check_vhost(true)) != srs_success) { return srs_error_wrap(err, "check vhost"); } - + srs_trace("connected stream, tcUrl=%s, pageUrl=%s, swfUrl=%s, schema=%s, vhost=%s, port=%d, app=%s, stream=%s, args=%s", req->tcUrl.c_str(), req->pageUrl.c_str(), req->swfUrl.c_str(), req->schema.c_str(), req->vhost.c_str(), req->port, req->app.c_str(), req->stream.c_str(), (req->args? "(obj)":"null")); - + // do token traverse before serve it. // @see https://github.com/ossrs/srs/pull/239 if (true) { @@ -505,7 +505,7 @@ srs_error_t SrsRtmpConn::stream_service_cycle() } } } - + // security check if ((err = security->check(info->type, ip, req)) != srs_success) { return srs_error_wrap(err, "rtmp: security check"); diff --git a/trunk/src/app/srs_app_rtsp.cpp b/trunk/src/app/srs_app_rtsp.cpp index e8c56c487..3c46ab9e6 100644 --- a/trunk/src/app/srs_app_rtsp.cpp +++ b/trunk/src/app/srs_app_rtsp.cpp @@ -643,7 +643,7 @@ srs_error_t SrsRtspConn::connect() std::string schema, host, vhost, app, param; int port; srs_discovery_tc_url(rtsp_tcUrl, schema, host, vhost, app, rtsp_stream, port, param); - + // generate output by template. std::string output = output_template; output = srs_string_replace(output, "[app]", app); diff --git a/trunk/src/libs/srs_librtmp.cpp b/trunk/src/libs/srs_librtmp.cpp index 6508b80c2..9bb0f3f95 100644 --- a/trunk/src/libs/srs_librtmp.cpp +++ b/trunk/src/libs/srs_librtmp.cpp @@ -479,7 +479,7 @@ int srs_librtmp_context_parse_uri(Context* context) int ret = ERROR_SUCCESS; std::string schema; - + srs_parse_rtmp_url(context->url, context->tcUrl, context->stream); // when connect, we only need to parse the tcUrl