X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavutil%2Ffile.h;h=f3af9ef7e57aceb11b72d32165b84f88668d3eca;hb=31ec69477193965111c95fe3bb321c109c9f91f2;hp=f28627c9d87a228251119e9141a975314b279855;hpb=60b54e4b9fac8519bb68501b73ac0efbcce5cff0;p=ffmpeg diff --git a/libavutil/file.h b/libavutil/file.h index f28627c9d87..f3af9ef7e57 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, int log_offset, void *log_ctx); + #endif /* AVUTIL_FILE_H */