mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 00:02:52 +00:00
av_tempfile: try tempnam(NULL) first
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
9329d36a3a
commit
797c2ef970
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user