# HG changeset patch # User Roman Arutyunyan # Date 1396281137 -14400 # Node ID c7bbc5fcf27cbdb1870db9dcbbabd470543b556a # Parent a24f88eff684889a203b04e8be70ce0e3899dc30 Mp4: fixed seeking to a track end. When "start" value is equal to a track duration the request fails with "time is out mp4 stts" like it did before track duration check was added. Now such tracks are considered short and skipped. diff --git a/src/http/modules/ngx_http_mp4_module.c b/src/http/modules/ngx_http_mp4_module.c --- a/src/http/modules/ngx_http_mp4_module.c +++ b/src/http/modules/ngx_http_mp4_module.c @@ -1507,7 +1507,7 @@ ngx_http_mp4_read_tkhd_atom(ngx_http_mp4 start_time = (uint64_t) mp4->start * mp4->timescale / 1000; - if (duration < start_time) { + if (duration <= start_time) { ngx_log_debug0(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, "tkhd duration is less than start time"); return NGX_DECLINED; @@ -1668,7 +1668,7 @@ ngx_http_mp4_read_mdhd_atom(ngx_http_mp4 start_time = (uint64_t) mp4->start * timescale / 1000; - if (duration < start_time) { + if (duration <= start_time) { ngx_log_debug0(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, "mdhd duration is less than start time"); return NGX_DECLINED;