1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avutil/file: Properly deprecate av_tempfile()

It has been deprecated in b4f59beeb4,
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>
This commit is contained in:
Andreas Rheinhardt 2022-08-28 00:13:24 +02:00
parent 72c601e0f7
commit dea9744560
4 changed files with 10 additions and 1 deletions

View File

@ -14,6 +14,9 @@ libavutil: 2021-04-27
API changes, most recent first: API changes, most recent first:
2022-09-03 - xxxxxxxxxx - lavu 57.35.100 - file.h
Deprecate av_tempfile() without replacement.
2022-08-03 - xxxxxxxxxx - lavu 57.34.100 - pixfmt.h 2022-08-03 - xxxxxxxxxx - lavu 57.34.100 - pixfmt.h
Add AV_PIX_FMT_VUYX. Add AV_PIX_FMT_VUYX.

View File

@ -155,6 +155,8 @@ void av_file_unmap(uint8_t *bufptr, size_t size)
#endif #endif
} }
#if FF_API_AV_FOPEN_UTF8
int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx) { int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx) {
return avpriv_tempfile(prefix, filename, log_offset, log_ctx); return avpriv_tempfile(prefix, filename, log_offset, log_ctx);
} }
#endif

View File

@ -22,6 +22,7 @@
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include "version.h"
#include "attributes.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); 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. * Wrapper to work around the lack of mkstemp() on mingw.
* Also, tries to create file in /tmp first, if possible. * 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. * libraries and could interfere with the calling application.
* @deprecated as fd numbers cannot be passed saftely between libs on some platforms * @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); int av_tempfile(const char *prefix, char **filename, int log_offset, void *log_ctx);
#endif
#endif /* AVUTIL_FILE_H */ #endif /* AVUTIL_FILE_H */

View File

@ -79,7 +79,7 @@
*/ */
#define LIBAVUTIL_VERSION_MAJOR 57 #define LIBAVUTIL_VERSION_MAJOR 57
#define LIBAVUTIL_VERSION_MINOR 34 #define LIBAVUTIL_VERSION_MINOR 35
#define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \