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
80380a0f
Commit
80380a0f
authored
Sep 05, 2007
by
David Conrad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write the creation time
Originally committed as revision 10336 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
5fd35c6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
matroskaenc.c
libavformat/matroskaenc.c
+13
-0
No files found.
libavformat/matroskaenc.c
View file @
80380a0f
...
...
@@ -127,6 +127,18 @@ static void put_ebml_string(ByteIOContext *pb, unsigned int elementid, const cha
put_ebml_binary
(
pb
,
elementid
,
str
,
strlen
(
str
));
}
// avtime is POSIX time, microseconds
static
void
put_ebml_date
(
ByteIOContext
*
pb
,
unsigned
int
elementid
,
int64_t
avtime
)
{
// midnight Jan 1, 1970 in UNIX epoch, microseconds
const
int64_t
ebmlDateStart
=
978307200ULL
*
1000000
;
int64_t
ebmlTime
=
(
avtime
-
ebmlDateStart
)
*
1000
;
put_ebml_id
(
pb
,
elementid
);
put_ebml_size
(
pb
,
8
,
0
);
put_be64
(
pb
,
ebmlTime
);
}
// this reserves exactly the amount of space specified by size, which must be at least 2
static
void
put_ebml_void
(
ByteIOContext
*
pb
,
uint64_t
size
)
{
...
...
@@ -526,6 +538,7 @@ static int mkv_write_header(AVFormatContext *s)
if
(
!
(
s
->
streams
[
0
]
->
codec
->
flags
&
CODEC_FLAG_BITEXACT
))
{
put_ebml_string
(
pb
,
MATROSKA_ID_MUXINGAPP
,
LIBAVFORMAT_IDENT
);
put_ebml_string
(
pb
,
MATROSKA_ID_WRITINGAPP
,
LIBAVFORMAT_IDENT
);
put_ebml_date
(
pb
,
MATROSKA_ID_DATEUTC
,
av_gettime
()
);
}
// XXX: segment UID
// reserve space for the 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