diff options
Diffstat (limited to 'libavutil/file.h')
-rw-r--r-- | libavutil/file.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavutil/file.h b/libavutil/file.h index f28627c9d8..c6d2692d52 100644 --- a/libavutil/file.h +++ b/libavutil/file.h @@ -49,4 +49,13 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, */ void av_file_unmap(uint8_t *bufptr, size_t size); +/** + * Wrapper to work around the lack of mkstemp() on mingw. + * Also, tries to create file in /tmp first, if possible. + * *prefix can be a character constant; *filename will be allocated internally. + * @return file descriptor of opened file (or -1 on error) + * and opened file name in **filename. + */ +int av_tempfile(const char *prefix, char **filename); + #endif /* AVUTIL_FILE_H */ |