Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
dc75e4e3
Commit
dc75e4e3
authored
Apr 21, 2010
by
David Conrad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
movenc: Write nero chapters
Originally committed as revision 22927 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
f7501a71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
movenc.c
libavformat/movenc.c
+29
-0
No files found.
libavformat/movenc.c
View file @
dc75e4e3
...
@@ -1513,6 +1513,32 @@ static int mov_write_3gp_udta_tag(ByteIOContext *pb, AVFormatContext *s,
...
@@ -1513,6 +1513,32 @@ static int mov_write_3gp_udta_tag(ByteIOContext *pb, AVFormatContext *s,
return
updateSize
(
pb
,
pos
);
return
updateSize
(
pb
,
pos
);
}
}
static
int
mov_write_chpl_tag
(
ByteIOContext
*
pb
,
AVFormatContext
*
s
)
{
int64_t
pos
=
url_ftell
(
pb
);
int
i
,
nb_chapters
=
FFMIN
(
s
->
nb_chapters
,
255
);
put_be32
(
pb
,
0
);
// size
put_tag
(
pb
,
"chpl"
);
put_be32
(
pb
,
0x01000000
);
// version + flags
put_be32
(
pb
,
0
);
// unknown
put_byte
(
pb
,
nb_chapters
);
for
(
i
=
0
;
i
<
nb_chapters
;
i
++
)
{
AVChapter
*
c
=
s
->
chapters
[
i
];
AVMetadataTag
*
t
;
put_be64
(
pb
,
av_rescale_q
(
c
->
start
,
c
->
time_base
,
(
AVRational
){
1
,
10000000
}));
if
((
t
=
av_metadata_get
(
c
->
metadata
,
"title"
,
NULL
,
0
)))
{
int
len
=
FFMIN
(
strlen
(
t
->
value
),
255
);
put_byte
(
pb
,
len
);
put_buffer
(
pb
,
t
->
value
,
len
);
}
else
put_byte
(
pb
,
0
);
}
return
updateSize
(
pb
,
pos
);
}
static
int
mov_write_udta_tag
(
ByteIOContext
*
pb
,
MOVMuxContext
*
mov
,
static
int
mov_write_udta_tag
(
ByteIOContext
*
pb
,
MOVMuxContext
*
mov
,
AVFormatContext
*
s
)
AVFormatContext
*
s
)
{
{
...
@@ -1551,6 +1577,9 @@ static int mov_write_udta_tag(ByteIOContext *pb, MOVMuxContext *mov,
...
@@ -1551,6 +1577,9 @@ static int mov_write_udta_tag(ByteIOContext *pb, MOVMuxContext *mov,
mov_write_meta_tag
(
pb_buf
,
mov
,
s
);
mov_write_meta_tag
(
pb_buf
,
mov
,
s
);
}
}
if
(
s
->
nb_chapters
)
mov_write_chpl_tag
(
pb_buf
,
s
);
if
((
size
=
url_close_dyn_buf
(
pb_buf
,
&
buf
))
>
0
)
{
if
((
size
=
url_close_dyn_buf
(
pb_buf
,
&
buf
))
>
0
)
{
put_be32
(
pb
,
size
+
8
);
put_be32
(
pb
,
size
+
8
);
put_tag
(
pb
,
"udta"
);
put_tag
(
pb
,
"udta"
);
...
...
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