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
2014-12-22 17:10:51 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2e43a63bf4e4e1e6ae7b10047cd3dd94f814ee60
2e43a63b
1 parent
77370427
fix #264, ignore the video NALU which is actually a sequence header to make HLS happy. 1.0.12
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
21 行增加
和
1 行删除
trunk/conf/full.conf
trunk/src/app/srs_app_config.hpp
trunk/src/app/srs_app_source.cpp
trunk/src/core/srs_core.hpp
trunk/conf/full.conf
查看文件 @
2e43a63
...
...
@@ -298,6 +298,7 @@ vhost with-hls.srs.com {
# the error strategy. canbe:
# ignore, when error ignore and disable hls.
# disconnect, when error disconnect the publish connection.
# continue, when error ignore and continue output hls.
# @see https://github.com/winlinvip/simple-rtmp-server/issues/264
# default: ignore
hls_on_error
ignore
;
...
...
trunk/src/app/srs_app_config.hpp
查看文件 @
2e43a63
...
...
@@ -50,6 +50,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define SRS_CONF_DEFAULT_HLS_WINDOW 60
#define SRS_CONF_DEFAULT_HLS_ON_ERROR_IGNORE "ignore"
#define SRS_CONF_DEFAULT_HLS_ON_ERROR_DISCONNECT "disconnect"
#define SRS_CONF_DEFAULT_HLS_ON_ERROR_CONTINUE "continue"
#define SRS_CONF_DEFAULT_HLS_ON_ERROR SRS_CONF_DEFAULT_HLS_ON_ERROR_IGNORE
#define SRS_CONF_DEFAULT_DVR_PATH "./objs/nginx/html"
#define SRS_CONF_DEFAULT_DVR_PLAN_SESSION "session"
...
...
trunk/src/app/srs_app_source.cpp
查看文件 @
2e43a63
...
...
@@ -1067,6 +1067,15 @@ int SrsSource::on_audio(SrsMessage* __audio)
// ignore.
ret
=
ERROR_SUCCESS
;
}
else
if
(
hls_error_strategy
==
SRS_CONF_DEFAULT_HLS_ON_ERROR_CONTINUE
)
{
// compare the sequence header with audio, continue when it's actually an sequence header.
if
(
ret
==
ERROR_HLS_DECODE_ERROR
&&
cache_sh_audio
&&
cache_sh_audio
->
size
==
msg
.
size
)
{
srs_warn
(
"the audio is actually a sequence header, ignore this packet."
);
ret
=
ERROR_SUCCESS
;
}
else
{
srs_warn
(
"hls continue audio failed. ret=%d"
,
ret
);
return
ret
;
}
}
else
{
srs_warn
(
"hls disconnect publisher for audio error. ret=%d"
,
ret
);
return
ret
;
...
...
@@ -1184,6 +1193,15 @@ int SrsSource::on_video(SrsMessage* __video)
// ignore.
ret
=
ERROR_SUCCESS
;
}
else
if
(
hls_error_strategy
==
SRS_CONF_DEFAULT_HLS_ON_ERROR_CONTINUE
)
{
// compare the sequence header with video, continue when it's actually an sequence header.
if
(
ret
==
ERROR_HLS_DECODE_ERROR
&&
cache_sh_video
&&
cache_sh_video
->
size
==
msg
.
size
)
{
srs_warn
(
"the video is actually a sequence header, ignore this packet."
);
ret
=
ERROR_SUCCESS
;
}
else
{
srs_warn
(
"hls continue video failed. ret=%d"
,
ret
);
return
ret
;
}
}
else
{
srs_warn
(
"hls disconnect publisher for video error. ret=%d"
,
ret
);
return
ret
;
...
...
trunk/src/core/srs_core.hpp
查看文件 @
2e43a63
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 1
#define VERSION_MINOR 0
#define VERSION_REVISION 1
1
#define VERSION_REVISION 1
2
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
#define RTMP_SIG_SRS_ROLE "origin/edge server"
...
...
请
注册
或
登录
后发表评论