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

Parse all mp4 boxes

This commit is contained in:
winlin 2017-05-13 22:37:46 +08:00
parent 366d6bcb82
commit fe43a31d06
3 changed files with 67 additions and 12 deletions

View file

@ -3948,7 +3948,9 @@ int SrsMp4BoxReader::read(SrsSimpleStream* stream, SrsMp4Box** ppbox)
while (stream->length() < (int)required) {
ssize_t nread;
if ((ret = rsio->read(buf, SRS_MP4_BUF_SIZE, &nread)) != ERROR_SUCCESS) {
srs_error("MP4 load failed, nread=%d, required=%d. ret=%d", nread, required, ret);
if (ret != ERROR_SYSTEM_FILE_EOF) {
srs_error("MP4 load failed, nread=%d, required=%d. ret=%d", nread, required, ret);
}
return ret;
}

View file

@ -1715,7 +1715,7 @@ public:
/**
* Read a sample from mp4.
* @param pht The sample hanler type, audio/soun or video/vide.
* @param pft, The frame type. For video, it's SrsVideoAvcFrameType.
* @param pft, The frame type. For video, it's SrsVideoAvcFrameType. For audio, ignored.
* @param pct, The codec type. For video, it's SrsVideoAvcFrameTrait. For audio, it's SrsAudioAacFrameTrait.
* @param pdts The output dts in milliseconds.
* @param ppts The output pts in milliseconds.