summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-28 00:13:24 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-03 15:42:40 +0200
commitdea974456035d8d43c69a23b9db036a544bb0455 (patch)
treed6c454b85a1cb05310bd726554243b0c56c13c03 /libavutil
parent72c601e0f71d3c71a53d43bdac935489ed86e3c5 (diff)
avutil/file: Properly deprecate av_tempfile()
It has been deprecated in b4f59beeb4c2171879d0d7607a4a7d6165f07791, but the attribute_deprecated was not set and there was no entry in APIchanges. This commit adds these and schedules it for removal. Given that the reason behind the deprecation is exactly the same as in av_fopen_utf8(), reuse its FF_API_AV_FOPEN_UTF8. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/file.c2
-rw-r--r--libavutil/file.h4
-rw-r--r--libavutil/version.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/libavutil/file.c b/libavutil/file.c
index edee6aaf80..6a2f3aa91c 100644
--- a/libavutil/file.c
+++ b/libavutil/file.c
@@ -155,6 +155,8 @@ void av_file_unmap(uint8_t *bufptr, size_t size)
#endif
}
+#if FF_API_AV_FOPEN_UTF8
int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx) {
return avpriv_tempfile(prefix, filename, log_offset, log_ctx);
}
+#endif
diff --git a/libavutil/file.h b/libavutil/file.h
index 8ec210e783..511c100db4 100644
--- a/libavutil/file.h
+++ b/libavutil/file.h
@@ -22,6 +22,7 @@
#include <stddef.h>
#include <stdint.h>
+#include "version.h"
#include "attributes.h"
/**
@@ -55,6 +56,7 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
*/
void av_file_unmap(uint8_t *bufptr, size_t size);
+#if FF_API_AV_FOPEN_UTF8
/**
* Wrapper to work around the lack of mkstemp() on mingw.
* Also, tries to create file in /tmp first, if possible.
@@ -67,6 +69,8 @@ void av_file_unmap(uint8_t *bufptr, size_t size);
* libraries and could interfere with the calling application.
* @deprecated as fd numbers cannot be passed saftely between libs on some platforms
*/
+attribute_deprecated
int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx);
+#endif
#endif /* AVUTIL_FILE_H */
diff --git a/libavutil/version.h b/libavutil/version.h
index 5d0df781cc..f33b3d1b49 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,7 +79,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 57
-#define LIBAVUTIL_VERSION_MINOR 34
+#define LIBAVUTIL_VERSION_MINOR 35
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \