From b6d650cdb40824cbde00273e986d3c4ac5adb4c0 Mon Sep 17 00:00:00 2001 From: tufang14 Date: Sat, 25 Apr 2015 14:59:12 +0800 Subject: [PATCH 1/2] m3u8 mount bug --- trunk/src/app/srs_app_http_conn.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/trunk/src/app/srs_app_http_conn.cpp b/trunk/src/app/srs_app_http_conn.cpp index 1e8121584..3a93eb347 100644 --- a/trunk/src/app/srs_app_http_conn.cpp +++ b/trunk/src/app/srs_app_http_conn.cpp @@ -965,7 +965,7 @@ int SrsHttpServer::hls_update_m3u8(SrsRequest* r, string m3u8) { int ret = ERROR_SUCCESS; - std::string mount = m3u8; + std::string mount; std::string sid = r->get_stream_url(); SrsHlsEntry* entry = NULL; @@ -980,8 +980,17 @@ int SrsHttpServer::hls_update_m3u8(SrsRequest* r, string m3u8) SrsHlsEntry* tmpl = thls[r->vhost]; entry = new SrsHlsEntry(); - entry->mount = tmpl->mount; + mount = tmpl->mount; + // replace the vhost variable + mount = srs_string_replace(mount, "[vhost]", r->vhost); + mount = srs_string_replace(mount, "[app]", r->app); + mount = srs_string_replace(mount, "[stream]", r->stream); + + // remove the default vhost mount + mount = srs_string_replace(mount, SRS_CONSTS_RTMP_DEFAULT_VHOST"/", "/"); + + entry->mount = mount; shls[sid] = entry; if (entry->streams.find(mount) == entry->streams.end()) { @@ -997,6 +1006,8 @@ int SrsHttpServer::hls_update_m3u8(SrsRequest* r, string m3u8) entry = shls[sid]; } + mount = entry->mount; + // update the m3u8 stream. SrsHlsM3u8Stream* hms = dynamic_cast(entry->streams[mount]); if (hms) { From b3bd007f0d5f19cd299a669a79b78be0e594e5d5 Mon Sep 17 00:00:00 2001 From: winlin Date: Wed, 29 Apr 2015 15:09:03 +0800 Subject: [PATCH 2/2] update git commit --- trunk/scripts/git.commit.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trunk/scripts/git.commit.sh b/trunk/scripts/git.commit.sh index 39858c726..e6f1e0d7c 100755 --- a/trunk/scripts/git.commit.sh +++ b/trunk/scripts/git.commit.sh @@ -41,7 +41,8 @@ function remote_check() fi ok_msg "remote $remote ok, url is $url" } -remote_check origin git@github.com:winlinvip/simple-rtmp-server.git +remote_check origin git@github.com:simple-rtmp-server/srs.git +remote_check srs.winlin git@github.com:winlinvip/simple-rtmp-server.git remote_check srs.csdn git@code.csdn.net:winlinvip/srs-csdn.git remote_check srs.oschina git@git.oschina.net:winlinvip/srs.oschina.git remote_check srs.gitlab git@gitlab.com:winlinvip/srs-gitlab.git @@ -63,11 +64,13 @@ function sync_push() } sync_push --all origin +sync_push --all srs.winlin sync_push --all srs.csdn sync_push --all srs.oschina sync_push --all srs.gitlab ok_msg "push refs ok" +sync_push --tags srs.winlin sync_push --tags srs.csdn sync_push --tags srs.oschina sync_push --tags srs.gitlab