From: Roman Arutyunyan Date: Wed, 29 Jan 2014 09:44:15 +0000 (+0400) Subject: Mp4: fix seeks to standalone last chunk. X-Git-Tag: release-1.5.10~10 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=d3e0bf306b86ac08b828886e75b8c30218a16377;p=nginx.git Mp4: fix seeks to standalone last chunk. If seek position is within the last track chunk and that chunk is standalone (stsc entry describes only this chunk) such seek generates stsc seek error. The problem is that chunk numbers start with 1, not with 0. --- diff --git a/src/http/modules/ngx_http_mp4_module.c b/src/http/modules/ngx_http_mp4_module.c index 9fe88ecce..c29ab1ce5 100644 --- a/src/http/modules/ngx_http_mp4_module.c +++ b/src/http/modules/ngx_http_mp4_module.c @@ -2494,7 +2494,7 @@ ngx_http_mp4_update_stsc_atom(ngx_http_mp4_file_t *mp4, entry++; } - next_chunk = trak->chunks; + next_chunk = trak->chunks + 1; ngx_log_debug4(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, "start_sample:%uD, chunk:%uD, chunks:%uD, samples:%uD",