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

For #1508, support chunk length and content in multiple parts.

This commit is contained in:
winlin 2019-12-24 14:58:35 +08:00
parent a35a7f915e
commit 7eccc9da26
7 changed files with 243 additions and 85 deletions

View file

@ -295,7 +295,7 @@ srs_error_t SrsHttpFileReader::read(void* buf, size_t count, ssize_t* pnread)
int total_read = 0;
while (total_read < (int)count) {
int nread = 0;
ssize_t nread = 0;
if ((err = http->read((char*)buf + total_read, (int)(count - total_read), &nread)) != srs_success) {
return srs_error_wrap(err, "read");
}
@ -306,7 +306,7 @@ srs_error_t SrsHttpFileReader::read(void* buf, size_t count, ssize_t* pnread)
}
srs_assert(nread);
total_read += nread;
total_read += (int)nread;
}
if (pnread) {