[FFmpeg-cvslog] av_tempfile: dont try the current directory with mkstemp() unless we are on windows

Michael Niedermayer git at videolan.org
Sun Oct 16 22:43:11 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 16 22:32:41 2011 +0200| [fd6af5375bcf3f78c61e4b0ca2e4274436746436] | committer: Michael Niedermayer

av_tempfile: dont try the current directory with mkstemp() unless we are on windows

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fd6af5375bcf3f78c61e4b0ca2e4274436746436
---

 libavutil/file.c |    2 ++
 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);



More information about the ffmpeg-cvslog mailing list