summaryrefslogtreecommitdiffstats
path: root/libavutil/file.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-16 22:32:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-16 22:32:41 +0200
commitfd6af5375bcf3f78c61e4b0ca2e4274436746436 (patch)
tree3ab1c6e937e7ce4b39e84f0820f6faa625a94f9f /libavutil/file.c
parente8e13358adea658869b83d73a94bd1b8d79f837b (diff)
downloadffmpeg-streaming-fd6af5375bcf3f78c61e4b0ca2e4274436746436.zip
ffmpeg-streaming-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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/file.c b/libavutil/file.c
index 88f2b52..e59335a 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);
OpenPOWER on IntegriCloud