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
76886589
Commit
76886589
authored
Nov 02, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/wavenc: Use localtime_r() for thread saftey
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
32a2876b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
wavenc.c
libavformat/wavenc.c
+3
-1
No files found.
libavformat/wavenc.c
View file @
76886589
...
...
@@ -38,6 +38,7 @@
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "libavutil/time_internal.h"
#include "avformat.h"
#include "avio.h"
...
...
@@ -267,10 +268,11 @@ static void peak_write_chunk(AVFormatContext *s)
memset
(
timestamp
,
0
,
sizeof
(
timestamp
));
if
(
!
(
s
->
flags
&
AVFMT_FLAG_BITEXACT
))
{
struct
tm
tmpbuf
;
av_log
(
s
,
AV_LOG_INFO
,
"Writing local time and date to Peak Envelope Chunk
\n
"
);
now0
=
av_gettime
();
now_secs
=
now0
/
1000000
;
strftime
(
timestamp
,
sizeof
(
timestamp
),
"%Y:%m:%d:%H:%M:%S:"
,
localtime
(
&
now_secs
));
strftime
(
timestamp
,
sizeof
(
timestamp
),
"%Y:%m:%d:%H:%M:%S:"
,
localtime
_r
(
&
now_secs
,
&
tmpbuf
));
av_strlcatf
(
timestamp
,
sizeof
(
timestamp
),
"%03d"
,
(
int
)((
now0
/
1000
)
%
1000
));
}
...
...
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