From a613eb78c6b89b0c2718ebed3f7b943ed7d5780c Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 1 May 2017 16:39:59 +0800 Subject: [PATCH] Fix #865, shouldn't remove ts/m3u8 when hls_dispose disabled. 2.0.242 --- README.md | 2 ++ trunk/src/app/srs_app_hls.cpp | 7 +++++++ trunk/src/core/srs_core.hpp | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 61672708a3..9f5733021c 100755 --- a/README.md +++ b/README.md @@ -337,6 +337,7 @@ Remark: ## History +* v2.0, 2017-05-01, Fix [#865][bug #865], shouldn't remove ts/m3u8 when hls_dispose disabled. 2.0.242 * v2.0, 2017-04-30, Fix [#636][bug #636], FD leak for requesting empty HTTP stream. 2.0.241 * v2.0, 2017-04-23, Fix [#851][bug #851], HTTP API support number of video frames for FPS. 2.0.240 * v2.0, 2017-04-18, [2.0 release1(2.0.239)][r2.0r1] released. 86515 lines. @@ -1295,6 +1296,7 @@ Winlin [bug #848]: https://github.com/ossrs/srs/issues/848 [bug #851]: https://github.com/ossrs/srs/issues/851 [bug #636]: https://github.com/ossrs/srs/issues/636 +[bug #865]: https://github.com/ossrs/srs/issues/865 [bug #xxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxx [exo #828]: https://github.com/google/ExoPlayer/pull/828 diff --git a/trunk/src/app/srs_app_hls.cpp b/trunk/src/app/srs_app_hls.cpp index 221f6a2fe3..78fc5c2ba3 100644 --- a/trunk/src/app/srs_app_hls.cpp +++ b/trunk/src/app/srs_app_hls.cpp @@ -1161,6 +1161,13 @@ void SrsHls::dispose() on_unpublish(); } + // Ignore when hls_dispose disabled. + // @see https://github.com/ossrs/srs/issues/865 + int hls_dispose = _srs_config->get_hls_dispose(_req->vhost); + if (!hls_dispose) { + return; + } + muxer->dispose(); } diff --git a/trunk/src/core/srs_core.hpp b/trunk/src/core/srs_core.hpp index 98c89c5014..0c6fc2b92d 100644 --- a/trunk/src/core/srs_core.hpp +++ b/trunk/src/core/srs_core.hpp @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // current release version #define VERSION_MAJOR 2 #define VERSION_MINOR 0 -#define VERSION_REVISION 241 +#define VERSION_REVISION 242 // generated by configure, only macros. #include