diff --git a/README.md b/README.md index c3838ec6f..a37ee269a 100755 --- a/README.md +++ b/README.md @@ -157,6 +157,7 @@ For previous versions, please read: ## V3 changes +* v3.0, 2020-01-25, Fix [#1108][bug #1108], reap DVR tmp file when unpublish. 3.0.106 * v3.0, 2020-01-21, [3.0 alpha9(3.0.105)][r3.0a9] released. 121577 lines. * v3.0, 2020-01-21, Fix [#1221][bug #1221], remove complex configure options. 3.0.104 * v3.0, 2020-01-21, Fix [#1547][bug #1547], support crossbuild for ARM/MIPS. @@ -295,6 +296,7 @@ For previous versions, please read: ## V2 changes +* v2.0, 2020-01-25, [2.0 release8(2.0.272)][r2.0r8] released. 87292 lines. * v2.0, 2020-01-08, Merge [#1554][bug #1554], support logrotate copytruncate. 2.0.272 * v2.0, 2020-01-05, Merge [#1551][bug #1551], fix memory leak in RTSP stack. 2.0.270 * v2.0, 2019-12-26, For [#1488][bug #1488], pass client ip to http callback. 2.0.269 @@ -1628,6 +1630,7 @@ Winlin [bug #1111]: https://github.com/ossrs/srs/issues/1111 [bug #463]: https://github.com/ossrs/srs/issues/463 [bug #1147]: https://github.com/ossrs/srs/issues/1147 +[bug #1108]: https://github.com/ossrs/srs/issues/1108 [bug #xxxxxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxxxxx [exo #828]: https://github.com/google/ExoPlayer/pull/828 @@ -1642,6 +1645,7 @@ Winlin [r3.0a2]: https://github.com/ossrs/srs/releases/tag/v3.0-a2 [r3.0a1]: https://github.com/ossrs/srs/releases/tag/v3.0-a1 [r3.0a0]: https://github.com/ossrs/srs/releases/tag/v3.0-a0 +[r2.0r8]: https://github.com/ossrs/srs/releases/tag/v2.0-r8 [r2.0r7]: https://github.com/ossrs/srs/releases/tag/v2.0-r7 [r2.0r6]: https://github.com/ossrs/srs/releases/tag/v2.0-r6 [r2.0r5]: https://github.com/ossrs/srs/releases/tag/v2.0-r5 diff --git a/trunk/conf/dash.conf b/trunk/conf/dash.conf new file mode 100644 index 000000000..9d7f21fdd --- /dev/null +++ b/trunk/conf/dash.conf @@ -0,0 +1,23 @@ +# the config for srs to delivery dash +# @see https://github.com/ossrs/srs/wiki/v1_CN_SampleDASH +# @see full.conf for detail config. + +listen 1935; +max_connections 1000; +daemon off; +srs_log_tank console; +http_server { + enabled on; + listen 8080; + dir ./objs/nginx/html; +} +vhost __defaultVhost__ { + dash { + enabled on; + dash_fragment 30; + dash_update_period 150; + dash_timeshift 300; + dash_path ./objs/nginx/html; + dash_mpd_file [app]/[stream].mpd; + } +} diff --git a/trunk/conf/hls.conf b/trunk/conf/hls.conf index d0fa42397..17416a294 100644 --- a/trunk/conf/hls.conf +++ b/trunk/conf/hls.conf @@ -6,6 +6,11 @@ listen 1935; max_connections 1000; daemon off; srs_log_tank console; +http_server { + enabled on; + listen 8080; + dir ./objs/nginx/html; +} vhost __defaultVhost__ { hls { enabled on; diff --git a/trunk/src/app/srs_app_dvr.cpp b/trunk/src/app/srs_app_dvr.cpp index 507956aed..aca14581a 100644 --- a/trunk/src/app/srs_app_dvr.cpp +++ b/trunk/src/app/srs_app_dvr.cpp @@ -813,7 +813,16 @@ srs_error_t SrsDvrSegmentPlan::on_publish() void SrsDvrSegmentPlan::on_unpublish() { + srs_error_t err = srs_success; + SrsDvrPlan::on_unpublish(); + + if ((err = segment->close()) != srs_success) { + srs_warn("ignore err %s", srs_error_desc(err).c_str()); + srs_freep(err); + } + + dvr_enabled = false; } srs_error_t SrsDvrSegmentPlan::on_audio(SrsSharedPtrMessage* shared_audio, SrsFormat* format)