From 1c3dc989ef5e93d9f87483320642d9fd66ccb0a7 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Fri, 25 Nov 2016 13:25:58 +0100 Subject: [PATCH] Work around deletion of still-needed init segments I assume they get accidentally deleted right after they're written, before the playlist is first created. Leave them around for another cleanup cycle rather than risk deleting them while still needed. --- dash/ngx_rtmp_dash_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dash/ngx_rtmp_dash_module.c b/dash/ngx_rtmp_dash_module.c index 13d6572..1038ae2 100644 --- a/dash/ngx_rtmp_dash_module.c +++ b/dash/ngx_rtmp_dash_module.c @@ -1565,7 +1565,7 @@ ngx_rtmp_dash_cleanup_dir(ngx_str_t *ppath, ngx_msec_t playlen) "dash: cleanup '%V' allowed, mpd missing '%s'", &name, mpd_path); - max_age = 0; + max_age = playlen / 500; } else if (name.len >= 4 && name.data[name.len - 4] == '.' && name.data[name.len - 3] == 'm' &&