diff --git a/dash/ngx_rtmp_dash_module.c b/dash/ngx_rtmp_dash_module.c index 9ca4d7d..13d6572 100644 --- a/dash/ngx_rtmp_dash_module.c +++ b/dash/ngx_rtmp_dash_module.c @@ -1634,7 +1634,11 @@ ngx_rtmp_dash_cleanup(void *data) // Next callback in doubled playlist length time to make sure what all // players read all segments +#if (nginx_version >= 1011005) + return cleanup->playlen * 2; +#else return cleanup->playlen / 500; +#endif } static ngx_int_t diff --git a/hls/ngx_rtmp_hls_module.c b/hls/ngx_rtmp_hls_module.c index db4baa4..15bd22a 100644 --- a/hls/ngx_rtmp_hls_module.c +++ b/hls/ngx_rtmp_hls_module.c @@ -2377,7 +2377,11 @@ ngx_rtmp_hls_cleanup(void *data) ngx_rtmp_hls_cleanup_dir(&cleanup->path, cleanup->playlen); // Next callback in half of playlist length time +#if (nginx_version >= 1011005) + return cleanup->playlen / 2; +#else return cleanup->playlen / 2000; +#endif }