summaryrefslogtreecommitdiff
path: root/libavformat/img2enc.c
diff options
context:
space:
mode:
authorClément Bœsch <clement@stupeflix.com>2015-12-08 10:44:31 +0100
committerClément Bœsch <clement@stupeflix.com>2015-12-21 11:19:51 +0100
commitb4431c80efe257129878a849ba12c14c3c7f9766 (patch)
tree2d9a0f6df9326c6fbf5329cbdd4520288a01a9c8 /libavformat/img2enc.c
parentf122ba36cb73596fe69256d66d56c23b2ff3f653 (diff)
downloadffmpeg-b4431c80efe257129878a849ba12c14c3c7f9766.tar.gz
lavf/img2enc: add atomic_writing option
This behaviour change caused a regression on our side recently, we might want to disable the option by default.
Diffstat (limited to 'libavformat/img2enc.c')
-rw-r--r--libavformat/img2enc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c
index c2e6e4d218..9291802a2a 100644
--- a/libavformat/img2enc.c
+++ b/libavformat/img2enc.c
@@ -73,7 +73,8 @@ static int write_header(AVFormatContext *s)
&& desc->nb_components >= 3;
}
- img->use_rename = proto && !strcmp(proto, "file");
+ img->use_rename = img->use_rename < 0 ? proto && !strcmp(proto, "file")
+ : img->use_rename;
return 0;
}
@@ -206,6 +207,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 },
{ NULL },
};