正在显示
1 个修改的文件
包含
9 行增加
和
4 行删除
| @@ -500,7 +500,8 @@ int SrsRtmpConn::playing(SrsSource* source) | @@ -500,7 +500,8 @@ int SrsRtmpConn::playing(SrsSource* source) | ||
| 500 | 500 | ||
| 501 | // use isolate thread to recv, | 501 | // use isolate thread to recv, |
| 502 | // @see: https://github.com/winlinvip/simple-rtmp-server/issues/217 | 502 | // @see: https://github.com/winlinvip/simple-rtmp-server/issues/217 |
| 503 | - SrsQueueRecvThread trd(rtmp, SRS_CONSTS_RTMP_PULSE_TIMEOUT_US); | 503 | + SrsQueueRecvThread trd(rtmp, |
| 504 | + SRS_CONSTS_RTMP_PULSE_TIMEOUT_US / 1000); | ||
| 504 | 505 | ||
| 505 | // start isolate recv thread. | 506 | // start isolate recv thread. |
| 506 | if ((ret = trd.start()) != ERROR_SUCCESS) { | 507 | if ((ret = trd.start()) != ERROR_SUCCESS) { |
| @@ -646,7 +647,9 @@ int SrsRtmpConn::fmle_publishing(SrsSource* source) | @@ -646,7 +647,9 @@ int SrsRtmpConn::fmle_publishing(SrsSource* source) | ||
| 646 | 647 | ||
| 647 | // use isolate thread to recv, | 648 | // use isolate thread to recv, |
| 648 | // @see: https://github.com/winlinvip/simple-rtmp-server/issues/237 | 649 | // @see: https://github.com/winlinvip/simple-rtmp-server/issues/237 |
| 649 | - SrsPublishRecvThread trd(rtmp, SRS_CONSTS_RTMP_RECV_TIMEOUT_US, this, source, true, vhost_is_edge); | 650 | + SrsPublishRecvThread trd(rtmp, |
| 651 | + SRS_CONSTS_RTMP_RECV_TIMEOUT_US / 1000, | ||
| 652 | + this, source, true, vhost_is_edge); | ||
| 650 | 653 | ||
| 651 | srs_info("start to publish stream %s success", req->stream.c_str()); | 654 | srs_info("start to publish stream %s success", req->stream.c_str()); |
| 652 | ret = do_publishing(source, &trd); | 655 | ret = do_publishing(source, &trd); |
| @@ -680,7 +683,9 @@ int SrsRtmpConn::flash_publishing(SrsSource* source) | @@ -680,7 +683,9 @@ int SrsRtmpConn::flash_publishing(SrsSource* source) | ||
| 680 | 683 | ||
| 681 | // use isolate thread to recv, | 684 | // use isolate thread to recv, |
| 682 | // @see: https://github.com/winlinvip/simple-rtmp-server/issues/237 | 685 | // @see: https://github.com/winlinvip/simple-rtmp-server/issues/237 |
| 683 | - SrsPublishRecvThread trd(rtmp, SRS_CONSTS_RTMP_RECV_TIMEOUT_US, this, source, false, vhost_is_edge); | 686 | + SrsPublishRecvThread trd(rtmp, |
| 687 | + SRS_CONSTS_RTMP_RECV_TIMEOUT_US / 1000, | ||
| 688 | + this, source, false, vhost_is_edge); | ||
| 684 | 689 | ||
| 685 | srs_info("start to publish stream %s success", req->stream.c_str()); | 690 | srs_info("start to publish stream %s success", req->stream.c_str()); |
| 686 | ret = do_publishing(source, &trd); | 691 | ret = do_publishing(source, &trd); |
| @@ -735,7 +740,7 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd) | @@ -735,7 +740,7 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd) | ||
| 735 | while (true) { | 740 | while (true) { |
| 736 | // use small loop to check the error code, interval = 30s/100 = 300ms. | 741 | // use small loop to check the error code, interval = 30s/100 = 300ms. |
| 737 | for (int i = 0; i < 100; i++) { | 742 | for (int i = 0; i < 100; i++) { |
| 738 | - st_usleep(SRS_CONSTS_RTMP_RECV_TIMEOUT_US * 1000 / 100); | 743 | + st_usleep(SRS_CONSTS_RTMP_RECV_TIMEOUT_US / 100); |
| 739 | 744 | ||
| 740 | // check the thread error code. | 745 | // check the thread error code. |
| 741 | if ((ret = trd->error_code()) != ERROR_SUCCESS) { | 746 | if ((ret = trd->error_code()) != ERROR_SUCCESS) { |
-
请 注册 或 登录 后发表评论