diff --git a/README.md b/README.md index 9b5a5e177..d90009bd9 100755 --- a/README.md +++ b/README.md @@ -184,6 +184,7 @@ Please select according to languages: ### V3 changes +* v3.0, 2018-11-11, Merge [#1261][bug #1261], Support `_definst_` for Wowza. 3.0.44 * v3.0, 2018-08-26, SRS [console](https://github.com/ossrs/srs-ngb) support both [Chinese](http://ossrs.net:1985/console/ng_index.html) and [English](http://ossrs.net:1985/console/en_index.html). * v3.0, 2018-08-25, Fix [#1093][bug #1093], Support HLS encryption. 3.0.42 * v3.0, 2018-08-25, Fix [#1051][bug #1051], Drop ts when republishing stream. 3.0.41 diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index fa4f69e38..129683acb 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -27,7 +27,7 @@ // current release version #define VERSION_MAJOR 3 #define VERSION_MINOR 0 -#define VERSION_REVISION 42 +#define VERSION_REVISION 44 // generated by configure, only macros. #include diff --git a/trunk/src/kernel/srs_kernel_utility.cpp b/trunk/src/kernel/srs_kernel_utility.cpp index 2c635d9e9..49596d3e6 100644 --- a/trunk/src/kernel/srs_kernel_utility.cpp +++ b/trunk/src/kernel/srs_kernel_utility.cpp @@ -356,10 +356,10 @@ string srs_erase_first_substr(string str, string erase_string) size_t pos = ret.find(erase_string); - if (pos != std::string::npos) - { + if (pos != std::string::npos) { ret.erase(pos, erase_string.length()); } + return ret; } @@ -369,10 +369,10 @@ string srs_erase_last_substr(string str, string erase_string) size_t pos = ret.rfind(erase_string); - if (pos != std::string::npos) - { + if (pos != std::string::npos) { ret.erase(pos, erase_string.length()); } + return ret; } diff --git a/trunk/src/protocol/srs_protocol_utility.cpp b/trunk/src/protocol/srs_protocol_utility.cpp index 402875f35..377f10979 100644 --- a/trunk/src/protocol/srs_protocol_utility.cpp +++ b/trunk/src/protocol/srs_protocol_utility.cpp @@ -63,6 +63,10 @@ void srs_vhost_resolve(string& vhost, string& app, string& param) app = srs_string_replace(app, "&&", "?"); app = srs_string_replace(app, "=", "?"); + if (srs_string_ends_with(app, "/_definst_")) { + app = srs_erase_last_substr(app, "/_definst_"); + } + if ((pos = app.find("?")) != std::string::npos) { std::string query = app.substr(pos + 1); app = app.substr(0, pos);