Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-16 23:24:12 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-10-16 23:51:28 +0400
commit797c2ef97036bb1e5546e27132af9900168066e5 (patch)
tree538987cb0731d968e85ec089fa77fe7a86d87f6a /libavutil/file.c
parent9329d36a3a7f3371e8a9279662c78e62ad9c7e2c (diff)
av_tempfile: try tempnam(NULL) first
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/file.c')
-rw-r--r--libavutil/file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavutil/file.c b/libavutil/file.c
index c388523d1b..44d2ca444a 100644
--- a/libavutil/file.c
+++ b/libavutil/file.c
@@ -133,7 +133,9 @@ void av_file_unmap(uint8_t *bufptr, size_t size)
int av_tempfile(const char *prefix, char **filename) {
int fd=-1;
#if !HAVE_MKSTEMP
- void *ptr= tempnam(".", prefix);
+ void *ptr= tempnam(NULL, prefix);
+ if(!ptr)
+ ptr= tempnam(".", prefix);
*filename = av_strdup(ptr);
#undef free
free(ptr);