Skip to content

Commit

Permalink
SRT: Fix the missing config mss. v5.0.188 (ossrs#3825)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: john <hondaxiao@tencent.com>
  • Loading branch information
xiaozhihong authored and duiniuluantanqin committed Oct 11, 2023
1 parent 3bbc855 commit 7d7e793
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions trunk/conf/full.conf
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,12 @@ srt_server {
# Overwrite by env SRS_SRT_SERVER_MAXBW
# default: -1
maxbw 1000000000;
# Maximum Segment Size. Used for buffer allocation and rate calculation using packet counter assuming fully
# filled packets. Each party can set its own MSS value independently. During a handshake the parties exchange
# MSS values, and the lowest is used.
# Overwrite by env SRS_SRT_SERVER_MSS
# default: 1500
mss 1500;
# The timeout time of the SRT connection on the sender side in ms. When SRT connects to a peer costs time
# more than this config, it will be close.
# Overwrite by env SRS_SRT_SERVER_CONNECT_TIMEOUT
Expand Down
1 change: 1 addition & 0 deletions trunk/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The changelog for SRS.
<a name="v5-changes"></a>

## SRS 5.0 Changelog
* v5.0, 2023-10-10, Merge [#3825](https://github.com/ossrs/srs/pull/3825): SRT: Fix the missing config mss. v5.0.188 (#3825)
* v5.0, 2023-10-08, Merge [#3824](https://github.com/ossrs/srs/pull/3824): Solve the problem of inaccurate HLS TS duration. v5.0.187 (#3824)
* v5.0, 2023-10-08, Merge [#3815](https://github.com/ossrs/srs/pull/3815): Use new cache image name. v5.0.186 (#3815)
* v5.0, 2023-09-28, Merge [#3816](https://github.com/ossrs/srs/pull/3816): cherry-pick from develop, for srt utest. v5.0.185 (#3816)
Expand Down
4 changes: 2 additions & 2 deletions trunk/src/app/srs_app_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7912,15 +7912,15 @@ int64_t SrsConfig::get_srto_maxbw()

int SrsConfig::get_srto_mss()
{
SRS_OVERWRITE_BY_ENV_INT("srs.srt_server.mms"); // SRS_SRT_SERVER_MMS
SRS_OVERWRITE_BY_ENV_INT("srs.srt_server.mss"); // SRS_SRT_SERVER_MSS

static int DEFAULT = 1500;
SrsConfDirective* conf = root->get("srt_server");
if (!conf) {
return DEFAULT;
}

conf = conf->get("mms");
conf = conf->get("mss");
if (!conf || conf->arg0().empty()) {
return DEFAULT;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version5.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

#define VERSION_MAJOR 5
#define VERSION_MINOR 0
#define VERSION_REVISION 187
#define VERSION_REVISION 188

#endif
2 changes: 1 addition & 1 deletion trunk/src/utest/srs_utest_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4225,7 +4225,7 @@ VOID TEST(ConfigEnvTest, CheckEnvValuesSrtServer)
SrsSetEnvConfig(srto_maxbw, "SRS_SRT_SERVER_MAXBW", "1000000000");
EXPECT_EQ(1000000000, conf.get_srto_maxbw());

SrsSetEnvConfig(srto_mss, "SRS_SRT_SERVER_MMS", "1000");
SrsSetEnvConfig(srto_mss, "SRS_SRT_SERVER_MSS", "1000");
EXPECT_EQ(1000, conf.get_srto_mss());

SrsSetEnvConfig(srto_conntimeout, "SRS_SRT_SERVER_CONNECT_TIMEOUT", "2000");
Expand Down

0 comments on commit 7d7e793

Please sign in to comment.