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-12-15 16:02:02 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
40457e6cab27af78624bb8b5687b5e2fe5a63050
40457e6c
1 parent
26d328e7
default hls_on_error to continue. 2.0.201
隐藏空白字符变更
内嵌
并排对比
正在显示
5 个修改的文件
包含
26 行增加
和
8 行删除
README.md
trunk/conf/full.conf
trunk/src/app/srs_app_config.cpp
trunk/src/app/srs_app_source.cpp
trunk/src/core/srs_core.hpp
README.md
查看文件 @
40457e6
...
...
@@ -337,6 +337,7 @@ Remark:
## History
*
v2.0, 2015-12-15, default hls_on_error to continue. 2.0.201
*
v2.0, 2015-11-16, for
[
#518
][
bug #518
]
fix fd leak bug when fork. 2.0.200
*
v2.0, 2015-11-05, for
[
#511
][
bug #511
]
fix bug for restart thread. 2.0.199
*
v2.0, 2015-11-02, for
[
#515
][
bug #515
]
use srs_freepa and SrsAutoFreeA for array. 2.0.198
...
...
trunk/conf/full.conf
查看文件 @
40457e6
...
...
@@ -539,12 +539,12 @@ vhost with-hls.srs.com {
# default: 60
hls_window
60
;
# 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.
# ignore, disable the hls.
# disconnect, require encoder republish.
# continue, ignore failed try to continue output hls.
# @see https://github.com/ossrs/srs/issues/264
# default: ignore
hls_on_error
ignore
;
# default: continue
hls_on_error
continue
;
# the hls storage: disk, ram or both.
# disk, to write hls m3u8/ts to disk.
# ram, serve m3u8/ts in memory, which use embeded http server to delivery.
...
...
trunk/src/app/srs_app_config.cpp
查看文件 @
40457e6
...
...
@@ -75,7 +75,7 @@ using namespace _srs_internal;
#define SRS_CONF_DEFAULT_HLS_TD_RATIO 1.5
#define SRS_CONF_DEFAULT_HLS_AOF_RATIO 2.0
#define SRS_CONF_DEFAULT_HLS_WINDOW 60
#define SRS_CONF_DEFAULT_HLS_ON_ERROR_IGNORE "
ignor
e"
#define SRS_CONF_DEFAULT_HLS_ON_ERROR_IGNORE "
continu
e"
#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
...
...
trunk/src/app/srs_app_source.cpp
100755 → 100644
查看文件 @
40457e6
...
...
@@ -1763,6 +1763,23 @@ int SrsSource::on_video(SrsCommonMessage* shared_video)
return
ret
;
}
bool
srs_hls_can_continue
(
int
ret
,
SrsSharedPtrMessage
*
sh
,
SrsSharedPtrMessage
*
video
)
{
// only continue for decode error.
if
(
ret
!=
ERROR_HLS_DECODE_ERROR
)
{
return
false
;
}
// when video size equals to sequence header,
// the video actually maybe a sequence header,
// continue to make ffmpeg happy.
if
(
sh
&&
sh
->
size
==
video
->
size
)
{
return
true
;
}
return
false
;
}
int
SrsSource
::
on_video_imp
(
SrsSharedPtrMessage
*
msg
)
{
int
ret
=
ERROR_SUCCESS
;
...
...
@@ -1827,7 +1844,7 @@ int SrsSource::on_video_imp(SrsSharedPtrMessage* msg)
ret
=
ERROR_SUCCESS
;
}
else
if
(
srs_config_hls_is_on_error_continue
(
hls_error_strategy
))
{
// 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
)
{
if
(
srs_hls_can_continue
(
ret
,
cache_sh_video
,
msg
)
)
{
srs_warn
(
"the video is actually a sequence header, ignore this packet."
);
ret
=
ERROR_SUCCESS
;
}
else
{
...
...
trunk/src/core/srs_core.hpp
查看文件 @
40457e6
...
...
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 20
0
#define VERSION_REVISION 20
1
// server info.
#define RTMP_SIG_SRS_KEY "SRS"
...
...
请
注册
或
登录
后发表评论