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

refine the hls_on_notify, only read a chunk.

This commit is contained in:
winlin 2015-04-10 12:27:30 +08:00
parent e3c6e52547
commit e6d6bdfe57
2 changed files with 4 additions and 4 deletions

View file

@ -243,7 +243,7 @@ int SrsDvrAsyncCallOnHlsNotify::call()
for (int i = 0; i < (int)on_hls->args.size(); i++) {
std::string url = on_hls->args.at(i);
if ((ret = SrsHttpHooks::on_hls_notify(url, req, ts_url)) != ERROR_SUCCESS) {
srs_error("hook client on_hls_notify failed. url=%s, ret=%d", url.c_str(), ret);
srs_error("hook client on_hls_notify failed. url=%s, ts=%s, ret=%d", url.c_str(), ts_url.c_str(), ret);
return ret;
}
}

View file

@ -361,10 +361,10 @@ int SrsHttpHooks::on_hls_notify(std::string url, SrsRequest* req, std::string ts
ISrsHttpResponseReader* br = msg->body_reader();
while (!br->eof()) {
std::string data;
if ((ret = br->read(data)) != ERROR_SUCCESS) {
// for notify, only read some data.
ret = br->read(data);
break;
}
}
srs_trace("http hook on_hls_notify success. client_id=%d, url=%s, code=%d, ret=%d",
client_id, url.c_str(), msg->status_code(), ret);