]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/img2enc.c
Merge commit '8958c5c64d05453204642b55a7b8b44c93023b17'
[ffmpeg] / libavformat / img2enc.c
index 280d598047362a6f7db749afab8cedcdd7e84cc7..ebbac2bf7b1a3c2e6b98344a0cef40b34e4e6e21 100644 (file)
@@ -51,7 +51,6 @@ static int write_header(AVFormatContext *s)
     VideoMuxData *img = s->priv_data;
     AVStream *st = s->streams[0];
     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(st->codec->pix_fmt);
-    const char *proto = avio_find_protocol_name(s->filename);
 
     av_strlcpy(img->path, s->filename, sizeof(img->path));
 
@@ -73,9 +72,6 @@ static int write_header(AVFormatContext *s)
                              && desc->nb_components >= 3;
     }
 
-    img->use_rename = img->use_rename < 0 ? proto && !strcmp(proto, "file")
-                                          : img->use_rename;
-
     return 0;
 }
 
@@ -208,7 +204,7 @@ static const AVOption muxoptions[] = {
     { "update",       "continuously overwrite one file", OFFSET(update),  AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0,       1, ENC },
     { "start_number", "set first number in the sequence", OFFSET(img_number), AV_OPT_TYPE_INT,  { .i64 = 1 }, 0, INT_MAX, ENC },
     { "strftime",     "use strftime for filename", OFFSET(use_strftime),  AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC },
-    { "atomic_writing", "write files atomically (using temporary files and renames)", OFFSET(use_rename), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, ENC },
+    { "atomic_writing", "write files atomically (using temporary files and renames)", OFFSET(use_rename), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, ENC },
     { NULL },
 };