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
191df4f2
Commit
191df4f2
authored
Dec 01, 2019
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/movenc: use iso6 major brand when signed CTS offsets are used in trun boxes
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
245ace4e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
movenc.c
libavformat/movenc.c
+11
-4
movenc
tests/ref/fate/movenc
+4
-4
No files found.
libavformat/movenc.c
View file @
191df4f2
...
...
@@ -4757,6 +4757,9 @@ static void mov_write_ftyp_tag_internal(AVIOContext *pb, AVFormatContext *s,
minor
=
has_h264
?
0x20000
:
0x10000
;
}
else
if
(
mov
->
mode
==
MODE_PSP
)
ffio_wfourcc
(
pb
,
"MSNV"
);
else
if
(
mov
->
mode
==
MODE_MP4
&&
mov
->
flags
&
FF_MOV_FLAG_FRAGMENT
&&
mov
->
flags
&
FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS
)
ffio_wfourcc
(
pb
,
"iso6"
);
// Required when using signed CTS offsets in trun boxes
else
if
(
mov
->
mode
==
MODE_MP4
&&
mov
->
flags
&
FF_MOV_FLAG_DEFAULT_BASE_MOOF
)
ffio_wfourcc
(
pb
,
"iso5"
);
// Required when using default-base-is-moof
else
if
(
mov
->
mode
==
MODE_MP4
&&
mov
->
flags
&
FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS
)
...
...
@@ -4807,10 +4810,14 @@ static int mov_write_ftyp_tag(AVIOContext *pb, AVFormatContext *s)
ffio_wfourcc
(
pb
,
"piff"
);
}
else
if
(
mov
->
mode
!=
MODE_MOV
)
{
// We add tfdt atoms when fragmenting, signal this with the iso6 compatible
// brand. This is compatible with users that don't understand tfdt.
if
(
mov
->
flags
&
FF_MOV_FLAG_FRAGMENT
)
ffio_wfourcc
(
pb
,
"iso6"
);
if
(
mov
->
mode
!=
MODE_MP4
)
{
// brand, if not already the major brand. This is compatible with users that
// don't understand tfdt.
if
(
mov
->
mode
==
MODE_MP4
)
{
if
(
mov
->
flags
&
FF_MOV_FLAG_FRAGMENT
&&
!
(
mov
->
flags
&
FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS
))
ffio_wfourcc
(
pb
,
"iso6"
);
}
else
{
if
(
mov
->
flags
&
FF_MOV_FLAG_FRAGMENT
)
ffio_wfourcc
(
pb
,
"iso6"
);
if
(
mov
->
flags
&
FF_MOV_FLAG_DEFAULT_BASE_MOOF
)
ffio_wfourcc
(
pb
,
"iso5"
);
else
if
(
mov
->
flags
&
FF_MOV_FLAG_NEGATIVE_CTS_OFFSETS
)
...
...
tests/ref/fate/movenc
View file @
191df4f2
...
...
@@ -140,14 +140,14 @@ write_data len 668, time 1566667, type sync atom moof
write_data len 440, time 2233333, type boundary atom moof
write_data len 262, time nopts, type trailer atom -
47cc2460c4b18390c67991cf3251409b 4209 vfr-noduration-interleave
write_data len 123
5
, time nopts, type header atom ftyp
write_data len 123
1
, time nopts, type header atom ftyp
write_data len 916, time 0, type sync atom moof
write_data len 908, time 1000000, type sync atom moof
write_data len 148, time nopts, type trailer atom -
c2
72739705fb78f9d9bffd4c6376c8ce 3207
delay-moov-elst-neg-cts
write_data len
40
, time nopts, type header atom ftyp
c2
00a345c365dd35a31e7e62a9ae6c10 3203
delay-moov-elst-neg-cts
write_data len
36
, time nopts, type header atom ftyp
write_data len 1123, time nopts, type header atom -
write_data len 1188, time 0, type sync atom moof
write_data len 908, time 1033333, type sync atom moof
write_data len 148, time nopts, type trailer atom -
26c05cd931471319def6f3d5257a6a7a 3407
empty-moov-neg-cts
38a287dc98272ba9da0a0bf8feb72fef 3403
empty-moov-neg-cts
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