X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavformat%2Fwavenc.c;h=bce4876976064ad7054d6efd8ff52ef6be7f9f45;hp=c73c9009d50895084e7f6920830b930b2d473787;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavformat/wavenc.c b/ffmpeg/libavformat/wavenc.c index c73c900..bce4876 100644 --- a/ffmpeg/libavformat/wavenc.c +++ b/ffmpeg/libavformat/wavenc.c @@ -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)); }