Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
zhengfl
2015-06-17 23:09:17 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b4ff9cfba16e3c6816b55ecf0952b28233353526
b4ff9cfb
1 parent
438914c4
fix bug
某种情况下,当客户端全部断开后,边缘服务器回源线程(EdgeIngester/EdgeForwarder)没有被断开。
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
14 行增加
和
22 行删除
trunk/src/app/srs_app_rtmp_conn.cpp
trunk/src/app/srs_app_rtmp_conn.cpp
100644 → 100755
查看文件 @
b4ff9cf
...
...
@@ -455,14 +455,6 @@ int SrsRtmpConn::stream_service_cycle()
case
SrsRtmpConnPlay
:
{
srs_verbose
(
"start to play stream %s."
,
req
->
stream
.
c_str
());
if
(
vhost_is_edge
)
{
// notice edge to start for the first client.
if
((
ret
=
source
->
on_edge_start_play
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notice edge start play stream failed. ret=%d"
,
ret
);
return
ret
;
}
}
// response connection start play
if
((
ret
=
rtmp
->
start_play
(
res
->
stream_id
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"start to play stream failed. ret=%d"
,
ret
);
...
...
@@ -482,13 +474,6 @@ int SrsRtmpConn::stream_service_cycle()
case
SrsRtmpConnFMLEPublish
:
{
srs_verbose
(
"FMLE start to publish stream %s."
,
req
->
stream
.
c_str
());
if
(
vhost_is_edge
)
{
if
((
ret
=
source
->
on_edge_start_publish
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notice edge start publish stream failed. ret=%d"
,
ret
);
return
ret
;
}
}
if
((
ret
=
rtmp
->
start_fmle_publish
(
res
->
stream_id
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"start to publish stream failed. ret=%d"
,
ret
);
return
ret
;
...
...
@@ -511,13 +496,6 @@ int SrsRtmpConn::stream_service_cycle()
case
SrsRtmpConnFlashPublish
:
{
srs_verbose
(
"flash start to publish stream %s."
,
req
->
stream
.
c_str
());
if
(
vhost_is_edge
)
{
if
((
ret
=
source
->
on_edge_start_publish
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notice edge start publish stream failed. ret=%d"
,
ret
);
return
ret
;
}
}
if
((
ret
=
rtmp
->
start_flash_publish
(
res
->
stream_id
))
!=
ERROR_SUCCESS
)
{
srs_error
(
"flash start to publish stream failed. ret=%d"
,
ret
);
return
ret
;
...
...
@@ -596,6 +574,14 @@ int SrsRtmpConn::playing(SrsSource* source)
}
SrsAutoFree
(
SrsConsumer
,
consumer
);
srs_verbose
(
"consumer created success."
);
if
(
_srs_config
->
get_vhost_is_edge
(
req
->
vhost
))
{
// notice edge to start for the first client.
if
((
ret
=
source
->
on_edge_start_play
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notice edge start play stream failed. ret=%d"
,
ret
);
return
ret
;
}
}
// use isolate thread to recv,
// @see: https://github.com/simple-rtmp-server/srs/issues/217
...
...
@@ -875,6 +861,12 @@ int SrsRtmpConn::do_publishing(SrsSource* source, SrsPublishRecvThread* trd)
}
srs_verbose
(
"hls on_publish success."
);
}
else
{
if
((
ret
=
source
->
on_edge_start_publish
())
!=
ERROR_SUCCESS
)
{
srs_error
(
"notice edge start publish stream failed. ret=%d"
,
ret
);
return
ret
;
}
}
// start isolate recv thread.
if
((
ret
=
trd
->
start
())
!=
ERROR_SUCCESS
)
{
...
...
请
注册
或
登录
后发表评论