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:
9329d36
)
av_tempfile: try tempnam(NULL) first
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 16 Oct 2011 19:24:12 +0000
(21:24 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 16 Oct 2011 19:51:28 +0000
(21:51 +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
c388523
..
44d2ca4
100644
(file)
--- 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);