From ce47d5cc28dcdb2247767873d6771f7c847fd6c4 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 24 Jun 2021 22:11:19 +0800 Subject: [PATCH 1/2] Squash: Update README --- CHANGELOG.md | 1 + trunk/src/core/srs_core_version4.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2020689b..d04a2e582 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2021-06-24, Merge [#2429](https://github.com/ossrs/srs/pull/2429) to fix SRT bug. 4.0.131 * v4.0, 2021-06-21, Fix [#2413](https://github.com/ossrs/srs/issues/2413), fix RTMP to RTC bug 4.0.130 * v4.0, 2021-06-20, Guess where FFmpeg is. 4.0.129 * v4.0, 2021-06-20, Fix [#1685](https://github.com/ossrs/srs/issues/1685), support RTC cross-build for armv7/armv8(aarch64). 4.0.128 diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index dfde9d483..45818b255 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 130 +#define VERSION_REVISION 131 #endif From d987e194ff9f303c2a5d209f0dcc229cb1a7bee5 Mon Sep 17 00:00:00 2001 From: Xiaoniu Date: Mon, 28 Jun 2021 07:25:25 +0800 Subject: [PATCH 2/2] fix bug: last segment of ts not trigger 'on_hls', because of 'on_unpublish' earlier than 'segment_close' (#2438) --- trunk/src/app/srs_app_hls.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp index e035b67af..144045064 100644 --- a/trunk/src/app/srs_app_hls.cpp +++ b/trunk/src/app/srs_app_hls.cpp @@ -923,10 +923,6 @@ srs_error_t SrsHlsController::on_unpublish() { srs_error_t err = srs_success; - if ((err = muxer->on_unpublish()) != srs_success) { - return srs_error_wrap(err, "muxer unpublish"); - } - if ((err = muxer->flush_audio(tsmc)) != srs_success) { return srs_error_wrap(err, "hls: flush audio"); } @@ -934,6 +930,10 @@ srs_error_t SrsHlsController::on_unpublish() if ((err = muxer->segment_close()) != srs_success) { return srs_error_wrap(err, "hls: segment close"); } + + if ((err = muxer->on_unpublish()) != srs_success) { + return srs_error_wrap(err, "muxer unpublish"); + } return err; }