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
95ee4e2c
Commit
95ee4e2c
authored
Oct 11, 2014
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
movenc: Add some comments explaining subtle details in writing the edit lists
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
72f80161
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
movenc.c
libavformat/movenc.c
+8
-0
No files found.
libavformat/movenc.c
View file @
95ee4e2c
...
...
@@ -1620,6 +1620,11 @@ static int mov_write_edts_tag(AVIOContext *pb, MOVTrack *track)
avio_wb32
(
pb
,
entry_count
);
if
(
delay
>
0
)
{
/* add an empty edit to delay presentation */
/* In the positive delay case, the delay includes the cts
* offset, and the second edit list entry below trims out
* the same amount from the actual content. This makes sure
* that the offsetted last sample is included in the edit
* list duration as well. */
if
(
version
==
1
)
{
avio_wb64
(
pb
,
delay
);
avio_wb64
(
pb
,
-
1
);
...
...
@@ -1634,6 +1639,9 @@ static int mov_write_edts_tag(AVIOContext *pb, MOVTrack *track)
* here, but use FFMIN in case dts is a a small positive integer
* rounded to 0 when represented in MOV_TIMESCALE units. */
start_ct
=
-
FFMIN
(
track
->
cluster
[
0
].
dts
,
0
);
/* Note, this delay is calculated from the pts of the first sample,
* ensuring that we don't reduce the duration for cases with
* dts<0 pts=0. */
duration
+=
delay
;
}
...
...
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