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

@ -398,11 +398,11 @@ srs_error_t SrsHttpHooks::on_hls_notify(int cid, std::string url, SrsRequest* re
int nb_read = 0;
ISrsHttpResponseReader* br = msg->body_reader();
while (nb_read < nb_notify && !br->eof()) {
int nb_bytes = 0;
ssize_t nb_bytes = 0;
if ((err = br->read(buf, nb_buf, &nb_bytes)) != srs_success) {
break;
}
nb_read += nb_bytes;
nb_read += (int)nb_bytes;
}
int spenttime = (int)(srsu2ms(srs_update_system_time()) - starttime);