diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 0b12608da..740a7f373 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -7,6 +7,7 @@ The changelog for SRS. ## SRS 7.0 Changelog +* v7.0, 2025-10-17, Merge [#4534](https://github.com/ossrs/srs/pull/4534): HLS: Fix a iterator bug in hls_ctx cleanup function. v7.0.99 (#4534) * v7.0, 2025-10-16, Merge [#4530](https://github.com/ossrs/srs/pull/4530): fix crash issue caused by reload configuration file. v7.0.98 (#4530) * v7.0, 2025-10-15, Merge [#4520](https://github.com/ossrs/srs/pull/4520): srs_app_rtc_conn: fix illegal memory access. v7.0.97 (#4520) * v7.0, 2025-10-14, Disable sanitizer by default to fix memory leak. (#4364) v7.0.96 @@ -112,6 +113,7 @@ The changelog for SRS. ## SRS 6.0 Changelog +* v6.0, 2025-10-17, Merge [#4534](https://github.com/ossrs/srs/pull/4534): HLS: Fix a iterator bug in hls_ctx cleanup function. v6.0.182 (#4534) * v6.0, 2025-10-14, Disable sanitizer by default to fix memory leak. (#4364) v6.0.181 * v6.0, 2025-10-01, SRT: Support configurable default_streamid option. v6.0.180 (#4515) * v6.0, 2025-09-27, For Edge, only support RTMP or HTTP-FLV. v6.0.179 (#4512) diff --git a/trunk/src/app/srs_app_http_static.cpp b/trunk/src/app/srs_app_http_static.cpp index dfed7d961..b0ed4547a 100644 --- a/trunk/src/app/srs_app_http_static.cpp +++ b/trunk/src/app/srs_app_http_static.cpp @@ -378,7 +378,7 @@ srs_error_t SrsHlsStream::on_timer(srs_utime_t interval) srs_error_t err = srs_success; std::map::iterator it; - for (it = map_ctx_info_.begin(); it != map_ctx_info_.end(); ++it) { + for (it = map_ctx_info_.begin(); it != map_ctx_info_.end();) { string ctx = it->first; SrsHlsVirtualConn *info = it->second; @@ -393,10 +393,10 @@ srs_error_t SrsHlsStream::on_timer(srs_utime_t interval) // TODO: FIXME: Should finger out the err. stat->on_disconnect(ctx, srs_success); - map_ctx_info_.erase(it); srs_freep(info); - - break; + map_ctx_info_.erase(it++); + } else { + ++it; } } diff --git a/trunk/src/core/srs_core_version6.hpp b/trunk/src/core/srs_core_version6.hpp index da7917013..1f34e7481 100644 --- a/trunk/src/core/srs_core_version6.hpp +++ b/trunk/src/core/srs_core_version6.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 6 #define VERSION_MINOR 0 -#define VERSION_REVISION 181 +#define VERSION_REVISION 182 #endif diff --git a/trunk/src/core/srs_core_version7.hpp b/trunk/src/core/srs_core_version7.hpp index da4ac8dd8..d5ffe5c74 100644 --- a/trunk/src/core/srs_core_version7.hpp +++ b/trunk/src/core/srs_core_version7.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 7 #define VERSION_MINOR 0 -#define VERSION_REVISION 98 +#define VERSION_REVISION 99 #endif \ No newline at end of file diff --git a/trunk/src/utest/srs_utest_mock.cpp b/trunk/src/utest/srs_utest_mock.cpp index 705052b0f..53c134d55 100644 --- a/trunk/src/utest/srs_utest_mock.cpp +++ b/trunk/src/utest/srs_utest_mock.cpp @@ -8,8 +8,8 @@ #include #include -#include #include +#include // MockRtcTrackDescriptionFactory implementation MockRtcTrackDescriptionFactory::MockRtcTrackDescriptionFactory() @@ -805,4 +805,3 @@ void MockAppConfig::set_keep_api_domain(bool enabled) { keep_api_domain_ = enabled; } - diff --git a/trunk/src/utest/srs_utest_mock.hpp b/trunk/src/utest/srs_utest_mock.hpp index cbbe8ee5d..c66d81b60 100644 --- a/trunk/src/utest/srs_utest_mock.hpp +++ b/trunk/src/utest/srs_utest_mock.hpp @@ -468,4 +468,3 @@ public: }; #endif - diff --git a/trunk/src/utest/srs_utest_rtc_playstream.cpp b/trunk/src/utest/srs_utest_rtc_playstream.cpp index 17ff56ae7..7ba5c42a3 100644 --- a/trunk/src/utest/srs_utest_rtc_playstream.cpp +++ b/trunk/src/utest/srs_utest_rtc_playstream.cpp @@ -13,8 +13,8 @@ #include #include -// This test is used to verify the basic workflow of the RTC play stream. -// It's finished with the help of AI, but each step is manually designed +// This test is used to verify the basic workflow of the RTC play stream. +// It's finished with the help of AI, but each step is manually designed // and verified. So this is not dominated by AI, but by humanbeing. VOID TEST(RtcPlayStreamTest, ManuallyVerifyBasicWorkflow) { @@ -64,7 +64,7 @@ VOID TEST(RtcPlayStreamTest, ManuallyVerifyBasicWorkflow) // Verify is_started_ flag is set EXPECT_TRUE(play_stream->is_started_); - // Wait for coroutine to start and create consumer. Normally it should be ready + // Wait for coroutine to start and create consumer. Normally it should be ready // and stopped at wait for RTP packets from consumer. srs_usleep(1 * SRS_UTIME_MILLISECONDS); }