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:00:58 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6fe36afcfac56b1e7b5f7b833ae8d85ac4e1053d
6fe36afc
1 parent
99574bb7
when hls timestamp jump, reset it.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
11 行增加
和
2 行删除
trunk/src/app/srs_app_hls.cpp
trunk/src/app/srs_app_hls.cpp
查看文件 @
6fe36af
...
...
@@ -53,6 +53,8 @@ using namespace std;
// drop the segment when duration of ts too small.
#define SRS_AUTO_HLS_SEGMENT_MIN_DURATION_MS 100
// when hls timestamp jump, reset it.
#define SRS_AUTO_HLS_SEGMENT_TIMESTAMP_JUMP_MS 300
// fragment plus the deviation percent.
#define SRS_HLS_FLOOR_REAP_PERCENT 0.3
...
...
@@ -161,6 +163,11 @@ void SrsHlsSegment::update_duration(int64_t current_frame_dts)
// update the segment duration, which is nagetive,
// just ignore it.
if
(
current_frame_dts
<
segment_start_dts
)
{
// for atc and timestamp jump, reset the start dts.
if
(
current_frame_dts
<
segment_start_dts
-
SRS_AUTO_HLS_SEGMENT_TIMESTAMP_JUMP_MS
*
90
)
{
srs_warn
(
"hls timestamp jump %"
PRId64
"=>%"
PRId64
,
segment_start_dts
,
current_frame_dts
);
segment_start_dts
=
current_frame_dts
;
}
return
;
}
...
...
@@ -830,8 +837,10 @@ int SrsHlsMuxer::refresh_m3u8()
}
// remove the temp file.
if
(
unlink
(
temp_m3u8
.
c_str
())
<
0
)
{
srs_warn
(
"ignore remove m3u8 failed, %s"
,
temp_m3u8
.
c_str
());
if
(
srs_path_exists
(
temp_m3u8
))
{
if
(
unlink
(
temp_m3u8
.
c_str
())
<
0
)
{
srs_warn
(
"ignore remove m3u8 failed, %s"
,
temp_m3u8
.
c_str
());
}
}
return
ret
;
...
...
请
注册
或
登录
后发表评论