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
胡斌
2017-03-15 06:15:31 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f183695f40977abe3691334eb67a71a77001eb96
f183695f
1 parent
21754d57
save hls header of total.m3u8 when total.m3u8 no content,last version save header when seq no is 0.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
13 行增加
和
23 行删除
trunk/src/app/srs_app_hls.cpp
trunk/src/app/srs_app_hls.cpp
查看文件 @
f183695
...
...
@@ -844,17 +844,17 @@ int SrsHlsMuxer::segment_close(string log_desc)
//add segment to total.m3u8
std
::
stringstream
ss
;
if
(
currentSeg
->
sequence_no
==
0
)
{
ret
=
total_m3u8_writer
.
open
(
total_m3u8
);
if
(
ret
!=
ERROR_SUCCESS
)
{
srs_error
(
"open total file %s error:%s reap ts segment, sequence_no=%d, uri=%s, duration=%.2f, start=%"
PRId64
,
total_m3u8
.
c_str
(),
log_desc
.
c_str
(),
currentSeg
->
sequence_no
,
currentSeg
->
uri
.
c_str
(),
currentSeg
->
duration
,
currentSeg
->
segment_start_dts
);
return
ret
;
}
ret
=
total_m3u8_writer
.
open_write
(
total_m3u8
);
if
(
ret
!=
ERROR_SUCCESS
)
{
srs_error
(
"open total file %s error:%s reap ts segment, sequence_no=%d, uri=%s, duration=%.2f, start=%"
PRId64
,
total_m3u8
.
c_str
(),
log_desc
.
c_str
(),
currentSeg
->
sequence_no
,
currentSeg
->
uri
.
c_str
(),
currentSeg
->
duration
,
currentSeg
->
segment_start_dts
);
return
ret
;
}
if
(
!
total_m3u8_writer
.
tellg
())
{
//write total m3u8 header
ss
<<
"#EXTM3U"
<<
SRS_CONSTS_LF
<<
"#EXT-X-VERSION:3"
...
...
@@ -866,20 +866,10 @@ int SrsHlsMuxer::segment_close(string log_desc)
ss
<<
"#EXT-X-TARGETDURATION:"
<<
"6000"
<<
SRS_CONSTS_LF
;
srs_verbose
(
"write m3u8 header success."
);
}
else
{
ret
=
total_m3u8_writer
.
open_write
(
total_m3u8
);
if
(
ret
!=
ERROR_SUCCESS
)
{
srs_error
(
"open total file %s error:%s reap ts segment, sequence_no=%d, uri=%s, duration=%.2f, start=%"
PRId64
,
total_m3u8
.
c_str
(),
log_desc
.
c_str
(),
currentSeg
->
sequence_no
,
currentSeg
->
uri
.
c_str
(),
currentSeg
->
duration
,
currentSeg
->
segment_start_dts
);
return
ret
;
}
m3u8_total_endlist_saved
=
false
;
}
bool
erase_last_endlist
=
false
;
if
(
currentSeg
->
is_sequence_header
)
{
...
...
请
注册
或
登录
后发表评论