正在显示
4 个修改的文件
包含
12 行增加
和
3 行删除
@@ -344,6 +344,7 @@ Remark: | @@ -344,6 +344,7 @@ Remark: | ||
344 | 344 | ||
345 | ### SRS 2.0 history | 345 | ### SRS 2.0 history |
346 | 346 | ||
347 | +* v2.0, 2015-07-16, for [#441](https://github.com/simple-rtmp-server/srs/issues/441) use 30s timeout for first msg. 2.0.178 | ||
347 | * v2.0, 2015-07-14, refine hls disable the time jitter, support not mix monotonically increase. 2.0.177 | 348 | * v2.0, 2015-07-14, refine hls disable the time jitter, support not mix monotonically increase. 2.0.177 |
348 | * v2.0, 2015-07-01, fix [#433](https://github.com/simple-rtmp-server/srs/issues/433) fix the sps parse bug. 2.0.176 | 349 | * v2.0, 2015-07-01, fix [#433](https://github.com/simple-rtmp-server/srs/issues/433) fix the sps parse bug. 2.0.176 |
349 | * v2.0, 2015-06-10, fix [#425](https://github.com/simple-rtmp-server/srs/issues/425) refine the time jitter, correct (-inf,-250)+(250,+inf) to 10ms. 2.0.175 | 350 | * v2.0, 2015-06-10, fix [#425](https://github.com/simple-rtmp-server/srs/issues/425) refine the time jitter, correct (-inf,-250)+(250,+inf) to 10ms. 2.0.175 |
@@ -782,8 +782,14 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd) | @@ -782,8 +782,14 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd) | ||
782 | while (!disposed) { | 782 | while (!disposed) { |
783 | pprint->elapse(); | 783 | pprint->elapse(); |
784 | 784 | ||
785 | - // cond wait for error. | ||
786 | - trd->wait(SRS_CONSTS_RTMP_PUBLISHER_RECV_TIMEOUT_US / 1000); | 785 | + // cond wait for timeout. |
786 | + if (nb_msgs == 0) { | ||
787 | + // when not got msgs, wait for a larger timeout. | ||
788 | + // @see https://github.com/simple-rtmp-server/srs/issues/441 | ||
789 | + trd->wait(SRS_CONSTS_RTMP_PUBLISHER_NO_MSG_RECV_TIMEOUT_US / 1000); | ||
790 | + } else { | ||
791 | + trd->wait(SRS_CONSTS_RTMP_PUBLISHER_RECV_TIMEOUT_US / 1000); | ||
792 | + } | ||
787 | 793 | ||
788 | // check the thread error code. | 794 | // check the thread error code. |
789 | if ((ret = trd->error_code()) != ERROR_SUCCESS) { | 795 | if ((ret = trd->error_code()) != ERROR_SUCCESS) { |
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
31 | // current release version | 31 | // current release version |
32 | #define VERSION_MAJOR 2 | 32 | #define VERSION_MAJOR 2 |
33 | #define VERSION_MINOR 0 | 33 | #define VERSION_MINOR 0 |
34 | -#define VERSION_REVISION 177 | 34 | +#define VERSION_REVISION 178 |
35 | 35 | ||
36 | // server info. | 36 | // server info. |
37 | #define RTMP_SIG_SRS_KEY "SRS" | 37 | #define RTMP_SIG_SRS_KEY "SRS" |
@@ -78,6 +78,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -78,6 +78,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
78 | // we must use more smaller timeout, for the recv never know the status | 78 | // we must use more smaller timeout, for the recv never know the status |
79 | // of underlayer socket. | 79 | // of underlayer socket. |
80 | #define SRS_CONSTS_RTMP_PUBLISHER_RECV_TIMEOUT_US (int64_t)(3*1000*1000LL) | 80 | #define SRS_CONSTS_RTMP_PUBLISHER_RECV_TIMEOUT_US (int64_t)(3*1000*1000LL) |
81 | +// when no msg recevied for publisher, use larger timeout. | ||
82 | +#define SRS_CONSTS_RTMP_PUBLISHER_NO_MSG_RECV_TIMEOUT_US 10*SRS_CONSTS_RTMP_PUBLISHER_RECV_TIMEOUT_US | ||
81 | 83 | ||
82 | // the timeout to wait for client control message, | 84 | // the timeout to wait for client control message, |
83 | // if timeout, we generally ignore and send the data to client, | 85 | // if timeout, we generally ignore and send the data to client, |
-
请 注册 或 登录 后发表评论