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.
This commit is contained in:
Roman Arutyunyan 2014-01-29 13:30:36 +04:00
parent c94c24b177
commit 870733ebd6

View File

@ -2153,11 +2153,8 @@ ngx_http_mp4_update_stss_atom(ngx_http_mp4_file_t *mp4,
entry++; entry++;
} }
ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0, ngx_log_debug0(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
"start sample is out of mp4 stss atom in \"%s\"", "start sample is out of mp4 stss atom");
mp4->file.name.data);
return NGX_ERROR;
found: found: