Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
0ea41ee3
Commit
0ea41ee3
authored
Apr 15, 2020
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/dashenc: add a maxSegmentDuration attribute to the Manifest
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
fd0f110a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
dashenc.c
libavformat/dashenc.c
+6
-0
No files found.
libavformat/dashenc.c
View file @
0ea41ee3
...
...
@@ -190,6 +190,7 @@ typedef struct DASHContext {
int
frag_type
;
int
write_prft
;
int64_t
max_gop_size
;
int64_t
max_segment_duration
;
int
profile
;
int64_t
target_latency
;
int
target_latency_refid
;
...
...
@@ -1189,6 +1190,9 @@ static int write_manifest(AVFormatContext *s, int final)
avio_printf
(
out
,
"
\"\n
"
);
}
}
avio_printf
(
out
,
"
\t
maxSegmentDuration=
\"
"
);
write_time
(
out
,
c
->
max_segment_duration
);
avio_printf
(
out
,
"
\"\n
"
);
avio_printf
(
out
,
"
\t
minBufferTime=
\"
"
);
write_time
(
out
,
c
->
ldash
&&
c
->
max_gop_size
?
c
->
max_gop_size
:
c
->
last_duration
*
2
);
avio_printf
(
out
,
"
\"
>
\n
"
);
...
...
@@ -1564,6 +1568,8 @@ static int dash_init(AVFormatContext *s)
os
->
frag_duration
=
as
->
frag_duration
;
os
->
frag_type
=
as
->
frag_type
;
c
->
max_segment_duration
=
FFMAX
(
c
->
max_segment_duration
,
as
->
seg_duration
);
if
(
c
->
profile
&
MPD_PROFILE_DVB
&&
(
os
->
seg_duration
>
15000000
||
os
->
seg_duration
<
960000
))
{
av_log
(
s
,
AV_LOG_ERROR
,
"Segment duration %"
PRId64
" is outside the allowed range for DVB-DASH profile
\n
"
,
os
->
seg_duration
);
return
AVERROR
(
EINVAL
);
...
...
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