[FFmpeg-devel] [PATCH 17/24] avutil: remove deprecated FF_API_AV_FOPEN_UTF8
James Almer
jamrial at gmail.com
Thu Jan 25 15:43:40 EET 2024
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavutil/avutil.h | 13 -------------
libavutil/file.c | 6 ------
libavutil/file.h | 17 -----------------
libavutil/file_open.c | 7 -------
libavutil/version.h | 1 -
5 files changed, 44 deletions(-)
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index a362c8baa8..d2900dcb48 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -335,19 +335,6 @@ unsigned av_int_list_length_for_size(unsigned elsize,
#define av_int_list_length(list, term) \
av_int_list_length_for_size(sizeof(*(list)), list, term)
-#if FF_API_AV_FOPEN_UTF8
-/**
- * Open a file using a UTF-8 filename.
- * The API of this function matches POSIX fopen(), errors are returned through
- * errno.
- * @deprecated Avoid using it, as on Windows, the FILE* allocated by this
- * function may be allocated with a different CRT than the caller
- * who uses the FILE*. No replacement provided in public API.
- */
-attribute_deprecated
-FILE *av_fopen_utf8(const char *path, const char *mode);
-#endif
-
/**
* Return the fractional representation of the internal time base.
*/
diff --git a/libavutil/file.c b/libavutil/file.c
index cc17885bcc..2d1063b6a2 100644
--- a/libavutil/file.c
+++ b/libavutil/file.c
@@ -155,9 +155,3 @@ void av_file_unmap(uint8_t *bufptr, size_t size)
av_free(bufptr);
#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 fc87a9cd6a..b5a762c28f 100644
--- a/libavutil/file.h
+++ b/libavutil/file.h
@@ -60,21 +60,4 @@ 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.
- * *prefix can be a character constant; *filename will be allocated internally.
- * @return file descriptor of opened file (or negative value corresponding to an
- * AVERROR code on error)
- * and opened file name in **filename.
- * @note On very old libcs it is necessary to set a secure umask before
- * calling this, av_tempfile() can't call umask itself as it is used in
- * 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/file_open.c b/libavutil/file_open.c
index 9aa4e4ac61..24ef33e3da 100644
--- a/libavutil/file_open.c
+++ b/libavutil/file_open.c
@@ -189,10 +189,3 @@ FILE *avpriv_fopen_utf8(const char *path, const char *mode)
return NULL;
return fdopen(fd, mode);
}
-
-#if FF_API_AV_FOPEN_UTF8
-FILE *av_fopen_utf8(const char *path, const char *mode)
-{
- return avpriv_fopen_utf8(path, mode);
-}
-#endif
diff --git a/libavutil/version.h b/libavutil/version.h
index 1936155e46..2dc913bbfd 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -105,7 +105,6 @@
* @{
*/
-#define FF_API_AV_FOPEN_UTF8 (LIBAVUTIL_VERSION_MAJOR < 59)
#define FF_API_PKT_DURATION (LIBAVUTIL_VERSION_MAJOR < 59)
#define FF_API_REORDERED_OPAQUE (LIBAVUTIL_VERSION_MAJOR < 59)
#define FF_API_FRAME_PICTURE_NUMBER (LIBAVUTIL_VERSION_MAJOR < 59)
--
2.43.0
More information about the ffmpeg-devel
mailing list