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
1cf9f6ed
Commit
1cf9f6ed
authored
May 05, 2010
by
David Conrad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mov: Read nero chapters
Originally committed as revision 23020 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
e1954bb5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
mov.c
libavformat/mov.c
+31
-0
No files found.
libavformat/mov.c
View file @
1cf9f6ed
...
...
@@ -219,6 +219,36 @@ static int mov_read_udta_string(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
return
0
;
}
static
int
mov_read_chpl
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOVAtom
atom
)
{
int64_t
start
;
int
i
,
nb_chapters
,
str_len
;
char
str
[
256
+
1
];
if
((
atom
.
size
-=
5
)
<
0
)
return
0
;
get_be32
(
pb
);
// version + flags
get_be32
(
pb
);
// ???
nb_chapters
=
get_byte
(
pb
);
for
(
i
=
0
;
i
<
nb_chapters
;
i
++
)
{
if
(
atom
.
size
<
9
)
return
0
;
start
=
get_be64
(
pb
);
str_len
=
get_byte
(
pb
);
if
((
atom
.
size
-=
9
+
str_len
)
<
0
)
return
0
;
get_buffer
(
pb
,
str
,
str_len
);
str
[
str_len
]
=
0
;
ff_new_chapter
(
c
->
fc
,
i
,
(
AVRational
){
1
,
10000000
},
start
,
AV_NOPTS_VALUE
,
str
);
}
return
0
;
}
static
int
mov_read_default
(
MOVContext
*
c
,
ByteIOContext
*
pb
,
MOVAtom
atom
)
{
int64_t
total_size
=
0
;
...
...
@@ -2166,6 +2196,7 @@ static int mov_read_elst(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
static
const
MOVParseTableEntry
mov_default_parse_table
[]
=
{
{
MKTAG
(
'a'
,
'v'
,
's'
,
's'
),
mov_read_extradata
},
{
MKTAG
(
'c'
,
'h'
,
'p'
,
'l'
),
mov_read_chpl
},
{
MKTAG
(
'c'
,
'o'
,
'6'
,
'4'
),
mov_read_stco
},
{
MKTAG
(
'c'
,
't'
,
't'
,
's'
),
mov_read_ctts
},
/* composition time to sample */
{
MKTAG
(
'd'
,
'i'
,
'n'
,
'f'
),
mov_read_default
},
...
...
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