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

@ -370,7 +370,7 @@ int SrsFlvSegment::update_flv_metadata()
}
// update the flesize.
fs->lseek(filesize_offset);
fs->seek2(filesize_offset);
if ((ret = fs->write(buf, SrsAmf0Size::number(), NULL)) != ERROR_SUCCESS) {
return ret;
}
@ -385,13 +385,13 @@ int SrsFlvSegment::update_flv_metadata()
}
// update the duration
fs->lseek(duration_offset);
fs->seek2(duration_offset);
if ((ret = fs->write(buf, SrsAmf0Size::number(), NULL)) != ERROR_SUCCESS) {
return ret;
}
// reset the offset.
fs->lseek(cur);
fs->seek2(cur);
return ret;
}