From f1be2ebd3bad559660ddfd2d41e6064a2fcdf866 Mon Sep 17 00:00:00 2001 From: john Date: Sat, 8 Oct 2022 19:28:28 -0500 Subject: [PATCH] SRT: use default streamid when empty (#3202) * SRT: use default streamid when empty * Fix #3198: SRT: Support PUSH SRT by IP and optional port. v5.0.76 Co-authored-by: winlin --- trunk/doc/CHANGELOG.md | 1 + trunk/src/app/srs_app_srt_conn.cpp | 5 +++-- trunk/src/core/srs_core_version5.hpp | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index f88c64c2e..3dbce9fb1 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -7,6 +7,7 @@ The changelog for SRS. ## SRS 5.0 Changelog +* v5.0, 2022-10-09, Fix [#3198](https://github.com/ossrs/srs/issues/3198): SRT: Support PUSH SRT by IP and optional port. v5.0.76 * v5.0, 2022-10-06, GB28181: Support GB28181-2016 protocol. v5.0.74 * v5.0, 2022-10-05, HTTP: Skip body and left message by upgrade. v5.0.73 * v5.0, 2022-10-02, ST: Support set context id while thread running. v5.0.72 diff --git a/trunk/src/app/srs_app_srt_conn.cpp b/trunk/src/app/srs_app_srt_conn.cpp index eb31fe2c6..32513f909 100644 --- a/trunk/src/app/srs_app_srt_conn.cpp +++ b/trunk/src/app/srs_app_srt_conn.cpp @@ -256,9 +256,10 @@ srs_error_t SrsMpegtsSrtConn::do_cycle() return srs_error_wrap(err, "get srt streamid"); } - // Must have streamid, because srt ts packet will convert to rtmp or rtc. + // If streamid empty, using default streamid instead. if (streamid.empty()) { - return srs_error_new(ERROR_SRT_CONN, "empty srt streamid"); + streamid = "#!::r=live/livestream,m=publish"; + srs_warn("srt get empty streamid, using default steramid %s instead", streamid.c_str()); } // Detect streamid of srt to request. diff --git a/trunk/src/core/srs_core_version5.hpp b/trunk/src/core/srs_core_version5.hpp index 2bbb24a52..4218cc5b1 100644 --- a/trunk/src/core/srs_core_version5.hpp +++ b/trunk/src/core/srs_core_version5.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 0 -#define VERSION_REVISION 75 +#define VERSION_REVISION 76 #endif