Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
audiowmark
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
audiowmark
Commits
a24701d1
Commit
a24701d1
authored
Jul 17, 2020
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLS: set initial_discontinuity flag for mpegts output
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
9a7bce31
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
hlsoutputstream.cc
src/hlsoutputstream.cc
+11
-1
No files found.
src/hlsoutputstream.cc
View file @
a24701d1
...
...
@@ -355,11 +355,21 @@ HLSOutputStream::open (const string& out_filename, size_t cut_aac_frames, size_t
if
(
!
m_fmt_ctx
)
return
Error
(
"failed to alloc avformat output context"
);
/*
* Since each segment is generated individually, the continuity counter fields of each
* mpegts segment start at 0, so we expect discontinuities whenever a new segment starts.
*
* Players are requested to ignore this by setting this flag.
*/
int
ret
=
av_opt_set
(
m_fmt_ctx
->
priv_data
,
"mpegts_flags"
,
"+initial_discontinuity"
,
0
);
if
(
ret
<
0
)
return
Error
(
av_err2str
(
ret
));
string
filename
=
out_filename
;
if
(
filename
==
"-"
)
filename
=
"pipe:1"
;
int
ret
=
avio_open
(
&
m_fmt_ctx
->
pb
,
filename
.
c_str
(),
AVIO_FLAG_WRITE
);
ret
=
avio_open
(
&
m_fmt_ctx
->
pb
,
filename
.
c_str
(),
AVIO_FLAG_WRITE
);
if
(
ret
<
0
)
return
Error
(
av_err2str
(
ret
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment