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-04-04 15:00:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4329366c08f52f70b1eb97fb02d1ef5a5d59f671
4329366c
1 parent
77c29da2
for #304, do not add deviation for absolute overflow.
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
2 行增加
和
6 行删除
trunk/src/app/srs_app_hls.cpp
trunk/src/app/srs_app_hls.cpp
查看文件 @
4329366
...
...
@@ -487,11 +487,7 @@ bool SrsHlsMuxer::is_segment_absolutely_overflow()
{
// @see https://github.com/winlinvip/simple-rtmp-server/issues/151#issuecomment-83553950
srs_assert
(
current
);
// use N% deviation, to smoother.
double
deviation
=
hls_ts_floor
?
SRS_HLS_FLOOR_REAP_PERCENT
*
hls_fragment_deviation
:
0.0
;
return
current
->
duration
>=
hls_aof_ratio
*
(
hls_fragment
+
deviation
);
return
current
->
duration
>=
hls_aof_ratio
*
hls_fragment
;
}
int
SrsHlsMuxer
::
update_acodec
(
SrsCodecAudio
ac
)
...
...
@@ -922,7 +918,7 @@ int SrsHlsCache::write_video(SrsAvcAacCodec* codec, SrsHlsMuxer* muxer, int64_t
// 2. some gops duration overflow.
if
(
sample
->
frame_type
==
SrsCodecVideoAVCFrameKeyFrame
&&
muxer
->
is_segment_overflow
())
{
if
(
!
sample
->
has_idr
)
{
srs_warn
(
"hls: ts starts without IDR, first nalu=%d
"
,
sample
->
first_nalu_type
);
srs_warn
(
"hls: ts starts without IDR, first nalu=%d
, idr=%d"
,
sample
->
first_nalu_type
,
sample
->
has_idr
);
}
if
((
ret
=
reap_segment
(
"video"
,
muxer
,
cache
->
video
->
dts
))
!=
ERROR_SUCCESS
)
{
return
ret
;
...
...
请
注册
或
登录
后发表评论