diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-10-16 22:32:41 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-16 22:32:41 +0200 |
commit | fd6af5375bcf3f78c61e4b0ca2e4274436746436 (patch) | |
tree | 3ab1c6e937e7ce4b39e84f0820f6faa625a94f9f /libavutil/file.c | |
parent | e8e13358adea658869b83d73a94bd1b8d79f837b (diff) | |
download | ffmpeg-fd6af5375bcf3f78c61e4b0ca2e4274436746436.tar.gz |
av_tempfile: dont try the current directory with mkstemp() unless we are on windows
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/file.c')
-rw-r--r-- | libavutil/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/file.c b/libavutil/file.c index 88f2b52da1..e59335a77a 100644 --- a/libavutil/file.c +++ b/libavutil/file.c @@ -160,11 +160,13 @@ int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_c #else snprintf(*filename, len, "/tmp/%sXXXXXX", prefix); fd = mkstemp(*filename); +#ifdef _WIN32 if (fd < 0) { snprintf(*filename, len, "./%sXXXXXX", prefix); fd = mkstemp(*filename); } #endif +#endif /* -----common section-----*/ if (fd < 0) { int err = AVERROR(errno); |