正在显示
2 个修改的文件
包含
3 行增加
和
3 行删除
| @@ -243,7 +243,7 @@ int SrsDvrAsyncCallOnHlsNotify::call() | @@ -243,7 +243,7 @@ int SrsDvrAsyncCallOnHlsNotify::call() | ||
| 243 | for (int i = 0; i < (int)on_hls->args.size(); i++) { | 243 | for (int i = 0; i < (int)on_hls->args.size(); i++) { |
| 244 | std::string url = on_hls->args.at(i); | 244 | std::string url = on_hls->args.at(i); |
| 245 | if ((ret = SrsHttpHooks::on_hls_notify(url, req, ts_url)) != ERROR_SUCCESS) { | 245 | if ((ret = SrsHttpHooks::on_hls_notify(url, req, ts_url)) != ERROR_SUCCESS) { |
| 246 | - srs_error("hook client on_hls_notify failed. url=%s, ret=%d", url.c_str(), ret); | 246 | + srs_error("hook client on_hls_notify failed. url=%s, ts=%s, ret=%d", url.c_str(), ts_url.c_str(), ret); |
| 247 | return ret; | 247 | return ret; |
| 248 | } | 248 | } |
| 249 | } | 249 | } |
| @@ -361,10 +361,10 @@ int SrsHttpHooks::on_hls_notify(std::string url, SrsRequest* req, std::string ts | @@ -361,10 +361,10 @@ int SrsHttpHooks::on_hls_notify(std::string url, SrsRequest* req, std::string ts | ||
| 361 | ISrsHttpResponseReader* br = msg->body_reader(); | 361 | ISrsHttpResponseReader* br = msg->body_reader(); |
| 362 | while (!br->eof()) { | 362 | while (!br->eof()) { |
| 363 | std::string data; | 363 | std::string data; |
| 364 | - if ((ret = br->read(data)) != ERROR_SUCCESS) { | 364 | + // for notify, only read some data. |
| 365 | + ret = br->read(data); | ||
| 365 | break; | 366 | break; |
| 366 | } | 367 | } |
| 367 | - } | ||
| 368 | 368 | ||
| 369 | srs_trace("http hook on_hls_notify success. client_id=%d, url=%s, code=%d, ret=%d", | 369 | srs_trace("http hook on_hls_notify success. client_id=%d, url=%s, code=%d, ret=%d", |
| 370 | client_id, url.c_str(), msg->status_code(), ret); | 370 | client_id, url.c_str(), msg->status_code(), ret); |
-
请 注册 或 登录 后发表评论