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
5f0bb0ba
Commit
5f0bb0ba
authored
May 11, 2011
by
Yusuke Nakamura
Committed by
Diego Biurrun
May 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mov: Support edit list atom version 1.
Signed-off-by:
Diego Biurrun
<
diego@biurrun.de
>
parent
ced9556b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
isom.h
libavformat/isom.h
+1
-1
mov.c
libavformat/mov.c
+11
-5
No files found.
libavformat/isom.h
View file @
5f0bb0ba
...
...
@@ -109,7 +109,7 @@ typedef struct MOVStreamContext {
unsigned
int
keyframe_count
;
int
*
keyframes
;
int
time_scale
;
int
time_offset
;
///< time offset of the first edit list entry
int
64_t
time_offset
;
///< time offset of the first edit list entry
int
current_sample
;
unsigned
int
bytes_per_frame
;
unsigned
int
samples_per_frame
;
...
...
libavformat/mov.c
View file @
5f0bb0ba
...
...
@@ -2163,13 +2163,13 @@ free_and_return:
static
int
mov_read_elst
(
MOVContext
*
c
,
AVIOContext
*
pb
,
MOVAtom
atom
)
{
MOVStreamContext
*
sc
;
int
i
,
edit_count
;
int
i
,
edit_count
,
version
;
if
(
c
->
fc
->
nb_streams
<
1
)
return
0
;
sc
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
]
->
priv_data
;
avio_r8
(
pb
);
/* version */
version
=
avio_r8
(
pb
);
/* version */
avio_rb24
(
pb
);
/* flags */
edit_count
=
avio_rb32
(
pb
);
/* entries */
...
...
@@ -2177,9 +2177,15 @@ static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return
-
1
;
for
(
i
=
0
;
i
<
edit_count
;
i
++
){
int
time
;
int
duration
=
avio_rb32
(
pb
);
/* Track duration */
time
=
avio_rb32
(
pb
);
/* Media time */
int64_t
time
;
int64_t
duration
;
if
(
version
==
1
)
{
duration
=
avio_rb64
(
pb
);
time
=
avio_rb64
(
pb
);
}
else
{
duration
=
avio_rb32
(
pb
);
/* segment duration */
time
=
avio_rb32
(
pb
);
/* media time */
}
avio_rb32
(
pb
);
/* Media rate */
if
(
i
==
0
&&
time
>=
-
1
)
{
sc
->
time_offset
=
time
!=
-
1
?
time
:
-
duration
;
...
...
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