1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

for #738, use reader and seeker for mp4 demuxer to seek for general mp4(ftyp-mdat-moov).

This commit is contained in:
winlin 2017-02-03 22:49:19 +08:00
parent bbee16e4db
commit 9d21a8bb33
16 changed files with 237 additions and 101 deletions

View file

@ -131,7 +131,7 @@ int SrsVodStream::serve_flv_stream(ISrsHttpResponseWriter* w, ISrsHttpMessage* r
}
// write body.
if ((ret = ffd.lseek(offset)) != ERROR_SUCCESS) {
if ((ret = ffd.seek2(offset)) != ERROR_SUCCESS) {
return ret;
}
@ -186,7 +186,7 @@ int SrsVodStream::serve_mp4_stream(ISrsHttpResponseWriter* w, ISrsHttpMessage* r
w->header()->set("Content-Range", content_range.str());
// write body.
fs.lseek(start);
fs.seek2(start);
// send data
if ((ret = copy(w, &fs, r, (int)left)) != ERROR_SUCCESS) {