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
winlin
2015-07-14 11:31:17 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d995726feef1df7012e6669091147503412536bf
d995726f
1 parent
9743e025
fix the http flv mount bug.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
10 行增加
和
3 行删除
trunk/src/app/srs_app_http_stream.cpp
trunk/src/app/srs_app_http_stream.cpp
查看文件 @
d995726
...
...
@@ -805,7 +805,14 @@ int SrsHttpStreamServer::http_mount(SrsSource* s, SrsRequest* r)
entry
->
cache
=
new
SrsStreamCache
(
s
,
r
);
entry
->
stream
=
new
SrsLiveStream
(
s
,
r
,
entry
->
cache
);
srs_assert
(
!
tmpl
->
req
);
// TODO: FIXME: maybe refine the logic of http remux service.
// if user push streams followed:
// rtmp://test.com/live/stream1
// rtmp://test.com/live/stream2
// and they will using the same template, such as: [vhost]/[app]/[stream].flv
// so, need to free last request object, otherwise, it will cause memory leak.
srs_freep
(
tmpl
->
req
);
tmpl
->
source
=
s
;
tmpl
->
req
=
r
->
copy
();
...
...
@@ -1170,8 +1177,8 @@ int SrsHttpStreamServer::hijack(ISrsHttpMessage* request, ISrsHttpHandler** ph)
std
::
string
sid
=
r
->
get_stream_url
();
// check if the stream is enabled.
if
(
sflvs
.
find
(
sid
)
!=
sflvs
.
end
())
{
SrsLiveEntry
*
entry
=
sflvs
[
sid
];
if
(
!
entry
->
stream
->
entry
->
enabled
)
{
SrsLiveEntry
*
s_entry
=
sflvs
[
sid
];
if
(
!
s_entry
->
stream
->
entry
->
enabled
)
{
srs_error
(
"stream is disabled, hijack failed. ret=%d"
,
ret
);
return
ret
;
}
...
...
请
注册
或
登录
后发表评论