X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavformat%2Fimg2enc.c;h=2b8b2d06060e52735e3abbece827c9bc9b092756;hp=37dfbecce31a5fadd99cffa8b6a808852fb50900;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavformat/img2enc.c b/ffmpeg/libavformat/img2enc.c index 37dfbec..2b8b2d0 100644 --- a/ffmpeg/libavformat/img2enc.c +++ b/ffmpeg/libavformat/img2enc.c @@ -26,6 +26,7 @@ #include "libavutil/log.h" #include "libavutil/opt.h" #include "libavutil/pixdesc.h" +#include "libavutil/time_internal.h" #include "avformat.h" #include "avio_internal.h" #include "internal.h" @@ -83,9 +84,9 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt) av_strlcpy(filename, img->path, sizeof(filename)); } else if (img->use_strftime) { time_t now0; - struct tm *tm; + struct tm *tm, tmpbuf; time(&now0); - tm = localtime(&now0); + tm = localtime_r(&now0, &tmpbuf); if (!strftime(filename, sizeof(filename), img->path, tm)) { av_log(s, AV_LOG_ERROR, "Could not get frame filename with strftime\n"); return AVERROR(EINVAL); @@ -194,7 +195,7 @@ AVOutputFormat ff_image2_muxer = { .long_name = NULL_IF_CONFIG_SMALL("image2 sequence"), .extensions = "bmp,dpx,jls,jpeg,jpg,ljpg,pam,pbm,pcx,pgm,pgmyuv,png," "ppm,sgi,tga,tif,tiff,jp2,j2c,j2k,xwd,sun,ras,rs,im1,im8,im24," - "sunras,webp,xbm,xface,pix,y", + "sunras,xbm,xface,pix,y", .priv_data_size = sizeof(VideoMuxData), .video_codec = AV_CODEC_ID_MJPEG, .write_header = write_header,