From 57604a9c659215979c02e696562a3d4c1c3c0240 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 30 Mar 2020 10:44:11 +0800 Subject: [PATCH] For #1672, fix dvr close file failed bug. 3.0.140 --- AUTHORS.txt | 4 +++- README.md | 1 + trunk/scripts/new_authors.sh | 1 - trunk/src/app/srs_app_dvr.cpp | 7 +++---- trunk/src/core/srs_core_version3.hpp | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index 89d65917fe..3c50cd4ca7 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -52,4 +52,6 @@ CONTRIBUTORS ordered by first contribution. * xialixin * alphonsetai * Michael.Ma -* lam2003 \ No newline at end of file +* lam2003 +* l<22312935+lam2003@users.noreply.github.com> +* xfalcon diff --git a/README.md b/README.md index 7624868ea3..2ee8a30113 100755 --- a/README.md +++ b/README.md @@ -149,6 +149,7 @@ For previous versions, please read: ## V3 changes +* v3.0, 2020-03-30, For [#1672][bug #1672], fix dvr close file failed bug. 3.0.140 * v3.0, 2020-03-29, [3.0 beta4(3.0.139)][r3.0b4] released. 122674 lines. * v3.0, 2020-03-28, Support multiple OS/Platform build cache. 3.0.139 * v3.0, 2020-03-28, For [#1250][bug #1250], support macOS, OSX, MacbookPro, Apple Darwin. 3.0.138 diff --git a/trunk/scripts/new_authors.sh b/trunk/scripts/new_authors.sh index 7bc0dadd07..f0a94123c9 100755 --- a/trunk/scripts/new_authors.sh +++ b/trunk/scripts/new_authors.sh @@ -11,7 +11,6 @@ for author in $authors; do echo $author| grep 'winterserver' >/dev/null 2>&1 && continue; echo $author| grep 'wenjie.zhao' >/dev/null 2>&1 && continue; echo $author| grep 'zhaowenjie' >/dev/null 2>&1 && continue; - echo $author| grep 'noreply' >/dev/null 2>&1 && continue; grep $author $AFILE 1>/dev/null 2>/dev/null && continue; diff --git a/trunk/src/app/srs_app_dvr.cpp b/trunk/src/app/srs_app_dvr.cpp index 48453091ac..453ba1dbc5 100644 --- a/trunk/src/app/srs_app_dvr.cpp +++ b/trunk/src/app/srs_app_dvr.cpp @@ -179,13 +179,12 @@ srs_error_t SrsDvrSegmenter::close() } // Close the encoder, then close the fs object. - if ((err = close_encoder()) != srs_success) { - fs->close(); + err = close_encoder(); + fs->close(); // Always close the file. + if (err != srs_success) { return srs_error_wrap(err, "close encoder"); } - fs->close(); - // when tmp flv file exists, reap it. if ((err = fragment->rename()) != srs_success) { return srs_error_wrap(err, "rename fragment"); diff --git a/trunk/src/core/srs_core_version3.hpp b/trunk/src/core/srs_core_version3.hpp index c732e77bea..d6bf63b984 100644 --- a/trunk/src/core/srs_core_version3.hpp +++ b/trunk/src/core/srs_core_version3.hpp @@ -24,6 +24,6 @@ #ifndef SRS_CORE_VERSION3_HPP #define SRS_CORE_VERSION3_HPP -#define SRS_VERSION3_REVISION 139 +#define SRS_VERSION3_REVISION 140 #endif