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-02-16 20:02:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c4a77cd6a0772198a424fa4defbb9be48e8fae05
c4a77cd6
1 parent
41f7bcff
add "#EXT-X-ENDLIST\n" at the end of total.m3u8 when unpublish
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
8 行增加
和
1 行删除
trunk/src/app/srs_app_hls.cpp
trunk/src/app/srs_app_hls.cpp
查看文件 @
c4a77cd
...
...
@@ -323,14 +323,17 @@ SrsHlsMuxer::~SrsHlsMuxer()
void
SrsHlsMuxer
::
dispose
()
{
if
(
should_write_file
)
{
if
(
hls_cleanup
)
{
std
::
vector
<
SrsHlsSegment
*>::
iterator
it
;
for
(
it
=
segments
.
begin
();
it
!=
segments
.
end
();
++
it
)
{
SrsHlsSegment
*
segment
=
*
it
;
if
(
unlink
(
segment
->
full_path
.
c_str
())
<
0
)
{
srs_warn
(
"dispose unlink path failed, file=%s."
,
segment
->
full_path
.
c_str
());
srs_warn
(
"dispose unlink path failed, file=%s."
,
segment
->
full_path
.
c_str
());
}
srs_freep
(
segment
);
}
}
segments
.
clear
();
if
(
current
)
{
...
...
@@ -816,6 +819,10 @@ int SrsHlsMuxer::segment_close(string log_desc)
ss
<<
currentSeg
->
uri
<<
SRS_CONSTS_LF
;
srs_verbose
(
"write m3u8 segment uri success."
);
if
(
log_desc
==
"unpublish"
){
ss
<<
"#EXT-X-ENDLIST"
<<
SRS_CONSTS_LF
;
}
// write m3u8 to writer.
std
::
string
m3u8
=
ss
.
str
();
if
((
ret
=
total_m3u8_writer
.
write
((
char
*
)
m3u8
.
c_str
(),
...
...
请
注册
或
登录
后发表评论