From 633a9a0d3582fb5cf3320564fe3cc0d57c02cd6c Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 5 Apr 2019 18:55:33 +0800 Subject: [PATCH 1/5] Merge #1324, Remove dead code --- trunk/src/app/srs_app_config.cpp | 2 -- trunk/src/protocol/srs_rtmp_stack.hpp | 6 ------ 2 files changed, 8 deletions(-) diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 55b1235ae..a23285146 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -4083,8 +4083,6 @@ string SrsConfig::get_work_dir() { } return conf->arg0(); - - return conf->arg0(); } bool SrsConfig::get_asprocess() diff --git a/trunk/src/protocol/srs_rtmp_stack.hpp b/trunk/src/protocol/srs_rtmp_stack.hpp index f22e8e622..1466c96f8 100644 --- a/trunk/src/protocol/srs_rtmp_stack.hpp +++ b/trunk/src/protocol/srs_rtmp_stack.hpp @@ -41,21 +41,15 @@ #include #include -class ISrsProtocolReadWriter; class SrsFastStream; -class SrsPacket; class SrsBuffer; -class SrsAmf0Object; class SrsAmf0Any; class SrsMessageHeader; -class SrsCommonMessage; class SrsChunkStream; class SrsSharedPtrMessage; -class IMergeReadHandler; class SrsProtocol; class ISrsProtocolReadWriter; -class SrsCommonMessage; class SrsCreateStreamPacket; class SrsFMLEStartPacket; class SrsPublishPacket; From a554dd85e110ca4ce9ec35423c9886edaff90371 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 5 Apr 2019 19:54:32 +0800 Subject: [PATCH 2/5] Fix GCC7 build error, this statement may fall through. 2.0.263 --- README.md | 2 ++ trunk/3rdparty/patches/7.http.parser.patch | 12 ++++++++++++ trunk/auto/depends.sh | 2 ++ trunk/src/core/srs_core.hpp | 2 +- 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 trunk/3rdparty/patches/7.http.parser.patch diff --git a/README.md b/README.md index c25da2bc6..ef585f734 100755 --- a/README.md +++ b/README.md @@ -335,6 +335,7 @@ Remark: ## History +* v2.0, 2019-04-05, Merge [#1312][bug #1312], Fix GCC7 build error, this statement may fall through. 2.0.263 * v2.0, 2019-04-05, Merge [#1339][bug #1339], Support HTTP-FLV params. 2.0.262 * v2.0, 2018-12-01, Merge [#1274][bug #1274], Upgrade to FFMPEG 4.1 and X264 157. 2.0.261 * v2.0, 2018-11-11, Merge [#1261][bug #1261], Support `_definst_` for Wowza. 2.0.260 @@ -1344,6 +1345,7 @@ Winlin [bug #1261]: https://github.com/ossrs/srs/issues/1261 [bug #1274]: https://github.com/ossrs/srs/pull/1274 [bug #1339]: https://github.com/ossrs/srs/pull/1339 +[bug #1312]: https://github.com/ossrs/srs/pull/1312 [bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx [exo #828]: https://github.com/google/ExoPlayer/pull/828 diff --git a/trunk/3rdparty/patches/7.http.parser.patch b/trunk/3rdparty/patches/7.http.parser.patch new file mode 100644 index 000000000..89655993c --- /dev/null +++ b/trunk/3rdparty/patches/7.http.parser.patch @@ -0,0 +1,12 @@ +--- Makefile 2019-04-05 19:43:32.000000000 +0800 ++++ ../http-parser-2.1-patch/Makefile 2019-04-05 19:50:26.000000000 +0800 +@@ -7,7 +7,8 @@ CPPFLAGS_DEBUG += $(CPPFLAGS_DEBUG_EXTRA + CPPFLAGS_FAST = $(CPPFLAGS) -DHTTP_PARSER_STRICT=0 + CPPFLAGS_FAST += $(CPPFLAGS_FAST_EXTRA) + +-CFLAGS += -Wall -Wextra -Werror ++# patch by winlin ++CFLAGS += -Wall -Wextra + CFLAGS_DEBUG = $(CFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA) + CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA) + CFLAGS_LIB = $(CFLAGS_FAST) -fPIC diff --git a/trunk/auto/depends.sh b/trunk/auto/depends.sh index 8f0922f48..a7fc91655 100755 --- a/trunk/auto/depends.sh +++ b/trunk/auto/depends.sh @@ -482,6 +482,8 @@ if [ $SRS_HTTP_CORE = YES ]; then rm -rf ${SRS_OBJS}/http-parser-2.1 && cd ${SRS_OBJS} && unzip -q ../3rdparty/http-parser-2.1.zip && cd http-parser-2.1 && patch -p0 < ../../3rdparty/patches/2.http.parser.patch && + # Patch build error for https://github.com/ossrs/srs/pull/1312#issuecomment-480243404 + patch -p0 < ../../3rdparty/patches/7.http.parser.patch && make package && cd .. && rm -rf hp && ln -sf http-parser-2.1 hp && cd .. && rm -f ${SRS_OBJS}/_flag.st.hp.tmp diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 07d075ed7..70de12135 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 2 #define VERSION_MINOR 0 -#define VERSION_REVISION 262 +#define VERSION_REVISION 263 // generated by configure, only macros. #include From 6e6e996bbaee73473f2ace76b7cb45a065368e7c Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 5 Apr 2019 20:09:23 +0800 Subject: [PATCH 3/5] Release 2.0.263 --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index ef585f734..4943ebe5b 100755 --- a/README.md +++ b/README.md @@ -294,6 +294,7 @@ Remark: ## Releases +* 2018-10-28, [Release v2.0-r6][r2.0r6], 2.0 release5, 2.0.263, 86994 lines. * 2018-10-28, [Release v2.0-r5][r2.0r5], 2.0 release5, 2.0.258, 86916 lines. * 2018-08-12, [Release v2.0-r4][r2.0r4], 2.0 release4, 2.0.255, 86915 lines. * 2018-07-18, [Release v2.0-r3][r2.0r3], 2.0 release3, 2.0.248, 86775 lines. @@ -335,6 +336,7 @@ Remark: ## History +* v2.0, 2019-04-05, [2.0 release5(2.0.263)][r2.0r6] released. 86994 lines. * v2.0, 2019-04-05, Merge [#1312][bug #1312], Fix GCC7 build error, this statement may fall through. 2.0.263 * v2.0, 2019-04-05, Merge [#1339][bug #1339], Support HTTP-FLV params. 2.0.262 * v2.0, 2018-12-01, Merge [#1274][bug #1274], Upgrade to FFMPEG 4.1 and X264 157. 2.0.261 @@ -1350,6 +1352,7 @@ Winlin [exo #828]: https://github.com/google/ExoPlayer/pull/828 +[r2.0r6]: https://github.com/ossrs/srs/releases/tag/v2.0-r6 [r2.0r5]: https://github.com/ossrs/srs/releases/tag/v2.0-r5 [r2.0r4]: https://github.com/ossrs/srs/releases/tag/v2.0-r4 [r2.0r3]: https://github.com/ossrs/srs/releases/tag/v2.0-r3 From ffe4ac654dde66abc928181ccbd9d81fa4b40f31 Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 5 Apr 2019 20:13:02 +0800 Subject: [PATCH 4/5] Update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4943ebe5b..85ef7563e 100755 --- a/README.md +++ b/README.md @@ -294,7 +294,7 @@ Remark: ## Releases -* 2018-10-28, [Release v2.0-r6][r2.0r6], 2.0 release5, 2.0.263, 86994 lines. +* 2018-10-28, [Release v2.0-r6][r2.0r6], 2.0 release6, 2.0.263, 86994 lines. * 2018-10-28, [Release v2.0-r5][r2.0r5], 2.0 release5, 2.0.258, 86916 lines. * 2018-08-12, [Release v2.0-r4][r2.0r4], 2.0 release4, 2.0.255, 86915 lines. * 2018-07-18, [Release v2.0-r3][r2.0r3], 2.0 release3, 2.0.248, 86775 lines. @@ -336,7 +336,7 @@ Remark: ## History -* v2.0, 2019-04-05, [2.0 release5(2.0.263)][r2.0r6] released. 86994 lines. +* v2.0, 2019-04-05, [2.0 release6(2.0.263)][r2.0r6] released. 86994 lines. * v2.0, 2019-04-05, Merge [#1312][bug #1312], Fix GCC7 build error, this statement may fall through. 2.0.263 * v2.0, 2019-04-05, Merge [#1339][bug #1339], Support HTTP-FLV params. 2.0.262 * v2.0, 2018-12-01, Merge [#1274][bug #1274], Upgrade to FFMPEG 4.1 and X264 157. 2.0.261 From a8781aee3e9dc046db3dc9f9e7436f4a4e13a492 Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 6 Apr 2019 15:35:12 +0800 Subject: [PATCH 5/5] For #1304, Default HSTRS to on. 2.0.264 --- README.md | 2 ++ trunk/src/app/srs_app_config.cpp | 8 ++++---- trunk/src/core/srs_core.hpp | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 85ef7563e..67031972d 100755 --- a/README.md +++ b/README.md @@ -336,6 +336,7 @@ Remark: ## History +* v2.0, 2019-04-06, For [#1304][bug #1304], Default HSTRS to on. 2.0.264 * v2.0, 2019-04-05, [2.0 release6(2.0.263)][r2.0r6] released. 86994 lines. * v2.0, 2019-04-05, Merge [#1312][bug #1312], Fix GCC7 build error, this statement may fall through. 2.0.263 * v2.0, 2019-04-05, Merge [#1339][bug #1339], Support HTTP-FLV params. 2.0.262 @@ -1348,6 +1349,7 @@ Winlin [bug #1274]: https://github.com/ossrs/srs/pull/1274 [bug #1339]: https://github.com/ossrs/srs/pull/1339 [bug #1312]: https://github.com/ossrs/srs/pull/1312 +[bug #1304]: https://github.com/ossrs/srs/pull/1304 [bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx [exo #828]: https://github.com/google/ExoPlayer/pull/828 diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 05b2624c4..5d90d0bee 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -4351,20 +4351,20 @@ bool SrsConfig::get_vhost_http_remux_hstrs(string vhost) { SrsConfDirective* conf = get_vhost(vhost); if (!conf) { - return false; + return true; } conf = conf->get("http_remux"); if (!conf) { - return false; + return true; } conf = conf->get("hstrs"); if (!conf || conf->arg0().empty()) { - return false; + return true; } - return SRS_CONF_PERFER_FALSE(conf->arg0()); + return SRS_CONF_PERFER_TRUE(conf->arg0()); } SrsConfDirective* SrsConfig::get_heartbeart() diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 70de12135..cd2470f27 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 2 #define VERSION_MINOR 0 -#define VERSION_REVISION 263 +#define VERSION_REVISION 264 // generated by configure, only macros. #include