mirror of
https://github.com/nginx/nginx.git
synced 2026-06-26 11:52:00 +00:00
Mp4: allow end values bigger than track duration.
If start time is within the track but end time is out of it, error "end time is out mp4 stts samples" is generated. However it's better to ignore the error and output the track until its end.
This commit is contained in:
parent
2349a6747d
commit
5147f8ee6a
1 changed files with 14 additions and 4 deletions
|
|
@ -2154,11 +2154,21 @@ ngx_http_mp4_crop_stts_data(ngx_http_mp4_file_t *mp4,
|
|||
entry++;
|
||||
}
|
||||
|
||||
ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
|
||||
"%s time is out mp4 stts samples in \"%s\"",
|
||||
start ? "start" : "end", mp4->file.name.data);
|
||||
if (start) {
|
||||
ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0,
|
||||
"start time is out mp4 stts samples in \"%s\"",
|
||||
mp4->file.name.data);
|
||||
|
||||
return NGX_ERROR;
|
||||
return NGX_ERROR;
|
||||
|
||||
} else {
|
||||
trak->end_sample = trak->start_sample + start_sample;
|
||||
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, mp4->file.log, 0,
|
||||
"end_sample:%ui", trak->end_sample);
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
found:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue