OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8e1335
)
av_tempfile: dont try the current directory with mkstemp() unless we are on windows
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 16 Oct 2011 20:32:41 +0000
(22:32 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 16 Oct 2011 20:32:41 +0000
(22:32 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/file.c
patch
|
blob
|
history
diff --git
a/libavutil/file.c
b/libavutil/file.c
index
88f2b52
..
e59335a
100644
(file)
--- 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);