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
70c86deb
Commit
70c86deb
authored
Dec 22, 2018
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mxfenc: support writing subsecond precision timestamps
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
02935c2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
mxfenc.c
libavformat/mxfenc.c
+5
-3
No files found.
libavformat/mxfenc.c
View file @
70c86deb
...
...
@@ -2332,8 +2332,9 @@ static int mxf_parse_mpeg2_frame(AVFormatContext *s, AVStream *st,
return
!!
sc
->
codec_ul
;
}
static
uint64_t
mxf_parse_timestamp
(
time_t
timestamp
)
static
uint64_t
mxf_parse_timestamp
(
int64_t
timestamp64
)
{
time_t
timestamp
=
timestamp64
/
1000000
;
struct
tm
tmbuf
;
struct
tm
*
time
=
gmtime_r
(
&
timestamp
,
&
tmbuf
);
if
(
!
time
)
...
...
@@ -2343,7 +2344,8 @@ static uint64_t mxf_parse_timestamp(time_t timestamp)
(
uint64_t
)
time
->
tm_mday
<<
32
|
time
->
tm_hour
<<
24
|
time
->
tm_min
<<
16
|
time
->
tm_sec
<<
8
;
time
->
tm_sec
<<
8
|
(
timestamp64
%
1000000
)
/
4000
;
}
static
void
mxf_gen_umid
(
AVFormatContext
*
s
)
...
...
@@ -2580,7 +2582,7 @@ static int mxf_write_header(AVFormatContext *s)
sc
->
order
=
AV_RB32
(
sc
->
track_essence_element_key
+
12
);
}
if
(
ff_parse_creation_time_metadata
(
s
,
&
timestamp
,
1
)
>
0
)
if
(
ff_parse_creation_time_metadata
(
s
,
&
timestamp
,
0
)
>
0
)
mxf
->
timestamp
=
mxf_parse_timestamp
(
timestamp
);
mxf
->
duration
=
-
1
;
...
...
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