mirror of
https://github.com/ossrs/srs.git
synced 2025-11-24 03:44:02 +08:00
HLS: Fix a iterator bug in hls_ctx cleanup function. v6.0.182 v7.0.99 (#4534)
Co-authored-by: OSSRS-AI <winlinam@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@ The changelog for SRS.
|
||||
<a name="v7-changes"></a>
|
||||
|
||||
## 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.
|
||||
<a name="v6-changes"></a>
|
||||
|
||||
## 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)
|
||||
|
||||
@@ -378,7 +378,7 @@ srs_error_t SrsHlsStream::on_timer(srs_utime_t interval)
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
std::map<std::string, SrsHlsVirtualConn *>::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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
|
||||
#define VERSION_MAJOR 6
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 181
|
||||
#define VERSION_REVISION 182
|
||||
|
||||
#endif
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
|
||||
#define VERSION_MAJOR 7
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 98
|
||||
#define VERSION_REVISION 99
|
||||
|
||||
#endif
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
#include <srs_app_rtc_conn.hpp>
|
||||
#include <srs_app_rtc_source.hpp>
|
||||
#include <srs_kernel_error.hpp>
|
||||
#include <srs_app_rtmp_source.hpp>
|
||||
#include <srs_kernel_error.hpp>
|
||||
|
||||
// MockRtcTrackDescriptionFactory implementation
|
||||
MockRtcTrackDescriptionFactory::MockRtcTrackDescriptionFactory()
|
||||
@@ -805,4 +805,3 @@ void MockAppConfig::set_keep_api_domain(bool enabled)
|
||||
{
|
||||
keep_api_domain_ = enabled;
|
||||
}
|
||||
|
||||
|
||||
@@ -468,4 +468,3 @@ public:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
#include <srs_utest_app6.hpp>
|
||||
#include <srs_utest_mock.hpp>
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user