Imported Debian version 2.5.0~trusty1.1
[deb_ffmpeg.git] / ffmpeg / libavformat / img2enc.c
index 37dfbecce31a5fadd99cffa8b6a808852fb50900..2b8b2d06060e52735e3abbece827c9bc9b092756 100644 (file)
@@ -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,