# HG changeset patch # User Roman Arutyunyan # Date 1390987836 -14400 # Node ID 847c308917afaabf3ae0e1fc0802296feec4e01e # Parent fdb67cfc957d110ea887961cc8c08a590df5f62c Mp4: fix seeks after the last key frame. Mp4 module does not allow seeks after the last key frame. Since stss atom only contains key frames it's usually shorter than other track atoms. That leads to stss seek error when seek position is close to the end of file. The fix outputs empty stss frame instead of generating error. 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 @@ -2153,11 +2153,8 @@ ngx_http_mp4_update_stss_atom(ngx_http_m entry++; } - ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0, - "start sample is out of mp4 stss atom in \"%s\"", - mp4->file.name.data); - - return NGX_ERROR; + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0, + "start sample is out of mp4 stss atom"); found: