comparison src/http/modules/ngx_http_mp4_module.c @ 5542:847c308917af

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.
author Roman Arutyunyan <arut@nginx.com>
date Wed, 29 Jan 2014 13:30:36 +0400
parents 9d056f10fb99
children 5730c0193842
comparison
equal deleted inserted replaced
5541:fdb67cfc957d 5542:847c308917af
2151 2151
2152 entries--; 2152 entries--;
2153 entry++; 2153 entry++;
2154 } 2154 }
2155 2155
2156 ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0, 2156 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
2157 "start sample is out of mp4 stss atom in \"%s\"", 2157 "start sample is out of mp4 stss atom");
2158 mp4->file.name.data);
2159
2160 return NGX_ERROR;
2161 2158
2162 found: 2159 found:
2163 2160
2164 data->pos = (u_char *) entry; 2161 data->pos = (u_char *) entry;
2165 2162