diff options
author | Martin Storsjö <martin@martin.st> | 2014-11-18 14:06:19 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2014-11-24 23:34:44 +0200 |
commit | b9d08c77a44390b0848c06f20bc0e9e951ba6a3c (patch) | |
tree | 3b888a8c125faa6e0aa695cf55fb96b1485331bf /libavformat/internal.h | |
parent | 40665d27e38e6a2f65037878202bd1a398c7683e (diff) |
lavf: Don't try to update files atomically with renames on windows
On windows, rename(2) will fail if the target file exists. On
unix this trick is used to make sure that people reading the file
either will get the full previous file, or the full new version
of the file, but no intermediate version.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/internal.h')
-rw-r--r-- | libavformat/internal.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/internal.h b/libavformat/internal.h index d579db5a47..5feb0f8434 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -365,4 +365,10 @@ static inline int ff_rename(const char *oldpath, const char *newpath) return 0; } +#ifndef _WIN32 +#define USE_RENAME_REPLACE 1 +#else +#define USE_RENAME_REPLACE 0 +#endif + #endif /* AVFORMAT_INTERNAL_H */ |