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:
885158c
)
av_tempfile: fix alloc type for !HAVE_MKSTEMP
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 16 Oct 2011 13:42:18 +0000
(15:42 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 16 Oct 2011 15:12:37 +0000
(17:12 +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
4d14292
..
7be095b
100644
(file)
--- a/
libavutil/file.c
+++ b/
libavutil/file.c
@@
-133,7
+133,10
@@
void av_file_unmap(uint8_t *bufptr, size_t size)
int av_tempfile(const char *prefix, char **filename) {
int fd=-1;
#if !HAVE_MKSTEMP
- *filename = tempnam(".", prefix);
+ void *ptr= tempnam(".", prefix);
+ *filename = av_strdup(ptr);
+#undef free
+ free(ptr);
#else
size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */
*filename = av_malloc(len);