mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #1105, http server support mp4 range.
This commit is contained in:
parent
7584c47aaf
commit
b9d720c927
3 changed files with 12 additions and 2 deletions
|
@ -157,10 +157,10 @@ srs_error_t SrsVodStream::serve_mp4_stream(ISrsHttpResponseWriter* w, ISrsHttpMe
|
|||
|
||||
// parse -1 to whole file.
|
||||
if (end == -1) {
|
||||
end = (int)fs->filesize();
|
||||
end = (int)(fs->filesize() - 1);
|
||||
}
|
||||
|
||||
if (end > fs->filesize() || start > end) {
|
||||
if (end > fs->filesize() || start > end || end < 0) {
|
||||
return srs_error_new(ERROR_HTTP_REMUX_OFFSET_OVERFLOW, "http mp4 streaming %s overflow. size=%" PRId64 ", offset=%d",
|
||||
fullpath.c_str(), fs->filesize(), start);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue