diff options
| author | Roman Arutyunyan <arut@nginx.com> | 2014-03-31 19:52:17 +0400 |
|---|---|---|
| committer | Roman Arutyunyan <arut@nginx.com> | 2014-03-31 19:52:17 +0400 |
| commit | 70e98eac3e33d5690e1b0c0404c3133f63e8bcba (patch) | |
| tree | 1091dfb188a19c91bbdfe73d8c514b1c82f2fb03 | |
| parent | ac5a3cbeee718850a8eba8b601d8827d649de201 (diff) | |
| download | nginx-70e98eac3e33d5690e1b0c0404c3133f63e8bcba.tar.gz nginx-70e98eac3e33d5690e1b0c0404c3133f63e8bcba.tar.bz2 | |
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.
| -rw-r--r-- | src/http/modules/ngx_http_mp4_module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_mp4_module.c b/src/http/modules/ngx_http_mp4_module.c index c9b67adca..7a7ae6da1 100644 --- 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_file_t *mp4, uint64_t atom_data_size) 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_file_t *mp4, uint64_t atom_data_size) 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; |
