From 2f52d0aefa57f155d608dc70baca30385e9adb5e Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 23 Dec 2021 18:38:18 +0800 Subject: [PATCH] Fix bug for HLS log printing. (#2807). v4.0.209 --- trunk/doc/CHANGELOG.md | 3 ++- trunk/src/app/srs_app_hls.cpp | 14 +++++++------- trunk/src/core/srs_core_version4.hpp | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/trunk/doc/CHANGELOG.md b/trunk/doc/CHANGELOG.md index 983d2f9c8..4b6cb4f8e 100644 --- a/trunk/doc/CHANGELOG.md +++ b/trunk/doc/CHANGELOG.md @@ -8,7 +8,8 @@ The changelog for SRS. ## SRS 4.0 Changelog -* v4.0, 2021-12-23, For [#2711](https://github.com/ossrs/srs/issues/2711), Refine the default config file. (#2711). v4.0.208 +* v4.0, 2021-12-23, For [#2807](https://github.com/ossrs/srs/issues/2807), Fix bug for HLS log printing. (#2807). v4.0.209 +* v4.0, 2021-12-23, For [#2711](https://github.com/ossrs/srs/pull/2711), Refine the default config file. (#2711). v4.0.208 * v4.0, 2021-12-20, Merge [#2784](https://github.com/ossrs/srs/pull/2784): RTC: Support payload name AV1X/AV1. (#2784)(#2760). v4.0.207 * v4.0, 2021-12-07, Merge [#2771](https://github.com/ossrs/srs/pull/2771): RTC: Fix memory leak when replace rtp packet in cache. (#2771). v4.0.205 * v4.0, 2021-12-06, Merge [#2766](https://github.com/ossrs/srs/pull/2766): RTC: Fix nack encode seqnum. (#2766). v4.0.204 diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp index c2780e622..8ec640761 100644 --- a/trunk/src/app/srs_app_hls.cpp +++ b/trunk/src/app/srs_app_hls.cpp @@ -63,17 +63,17 @@ void SrsHlsSegment::config_cipher(unsigned char* key,unsigned char* iv) SrsEncFileWriter* fw = (SrsEncFileWriter*)writer; fw->config_cipher(key, iv); -} - -srs_error_t SrsHlsSegment::rename() +} + +srs_error_t SrsHlsSegment::rename() { if (true) { std::stringstream ss; ss << srsu2msi(duration()); uri = srs_string_replace(uri, "[duration]", ss.str()); - } - - return SrsFragment::rename(); + } + + return SrsFragment::rename(); } SrsDvrAsyncCallOnHls::SrsDvrAsyncCallOnHls(SrsContextId c, SrsRequest* r, string p, string t, string m, string mu, int s, srs_utime_t d) @@ -1355,7 +1355,7 @@ void SrsHls::hls_show_mux_log() // the run time is not equals to stream time, // @see: https://github.com/ossrs/srs/issues/81#issuecomment-48100994 // it's ok. - srs_trace("-> " SRS_CONSTS_LOG_HLS " time=%dms, sno=%d, ts=%s, dur=%.2f, dva=%dp", + srs_trace("-> " SRS_CONSTS_LOG_HLS " time=%dms, sno=%d, ts=%s, dur=%dms, dva=%dp", pprint->age(), controller->sequence_no(), controller->ts_url().c_str(), srsu2msi(controller->duration()), controller->deviation()); } diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index 288a92135..d012e1e71 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 208 +#define VERSION_REVISION 209 #endif