From d220bf280e3e5356e07c4100a3ad3ad9c8b38b2e Mon Sep 17 00:00:00 2001 From: Jacob Su Date: Sat, 13 Jul 2024 16:14:33 +0800 Subject: [PATCH] DASH: Fix time unit error for disposing. v6.0.138 (#4111) ## Cause dash auto dispose is configured by seconds, but the code compare by usecond, 1 second = 1,000,000 useconds. releated to #4097 Bug introduced after #4097 supported Dash auto dispose after a timeout without media data. ## How to reproduce 1. `./objs/srs -c conf/dash.conf` 2. publish a rtmp stream. 3. play dash stream. -> no dash stream, always 404 error. --------- Co-authored-by: winlin --- trunk/doc/CHANGELOG.md | 1 + trunk/src/app/srs_app_config.cpp | 2 +- trunk/src/core/srs_core_version6.hpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 9c54cfc36..fc0d91ff1 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -7,6 +7,7 @@ The changelog for SRS. ## SRS 6.0 Changelog +* v6.0, 2024-07-13, Merge [#4111](https://github.com/ossrs/srs/pull/4111): DASH: Fix time unit error for disposing. v6.0.138 (#4111) * v6.0, 2024-07-09, Merge [#4028](https://github.com/ossrs/srs/pull/4028): HTTPS: Support config key/cert for HTTPS API. v6.0.137 (#4028) * v6.0, 2024-07-09, Merge [#4109](https://github.com/ossrs/srs/pull/4109): UniquePtr: Support SrsUniquePtr to replace SrsAutoFree. v6.0.136 (#4109) * v6.0, 2024-07-08, Merge [#4042](https://github.com/ossrs/srs/pull/4042): Refine config directive token parsing. v6.0.135 (#4042) diff --git a/trunk/src/app/srs_app_config.cpp b/trunk/src/app/srs_app_config.cpp index 5401a9432..fe9174541 100644 --- a/trunk/src/app/srs_app_config.cpp +++ b/trunk/src/app/srs_app_config.cpp @@ -6871,7 +6871,7 @@ srs_utime_t SrsConfig::get_dash_dispose(std::string vhost) { SRS_OVERWRITE_BY_ENV_SECONDS("srs.vhost.dash.dash_dispose"); // SRS_VHOST_DASH_DASH_DISPOSE - static srs_utime_t DEFAULT = 120; + static srs_utime_t DEFAULT = 120 * SRS_UTIME_SECONDS; SrsConfDirective* conf = get_dash(vhost); if (!conf) { diff --git a/trunk/src/core/srs_core_version6.hpp b/trunk/src/core/srs_core_version6.hpp index 29615096f..aff5699c1 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 137 +#define VERSION_REVISION 138 #endif