From: Jonas Karlman <jo...@kwiboo.se> Co-authored-by: Elie ROUDNINSKI <xade...@gmail.com> --- doc/APIchanges | 3 +++ libavutil/buffer.c | 7 +++++++ libavutil/buffer.h | 5 +++++ libavutil/version.h | 4 ++-- 4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges index 1a9f0a303e..049b23a6fa 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,6 +14,9 @@ libavutil: 2021-04-27 API changes, most recent first: +2022-xx-xx - xxxxxxxxxx - lavu 57.25.100 - buffer.h + Add av_buffer_pool_flush(). + 2022-03-16 - xxxxxxxxxx - all libraries - version_major.h Add lib<name>/version_major.h as new installed headers, which only contain the major version number (and corresponding API deprecation diff --git a/libavutil/buffer.c b/libavutil/buffer.c index 54590be566..4bbe7b2787 100644 --- a/libavutil/buffer.c +++ b/libavutil/buffer.c @@ -304,6 +304,13 @@ static void buffer_pool_flush(AVBufferPool *pool) } } +void av_buffer_pool_flush(AVBufferPool *pool) +{ + ff_mutex_lock(&pool->mutex); + buffer_pool_flush(pool); + ff_mutex_unlock(&pool->mutex); +} + /* * This function gets called when the pool has been uninited and * all the buffers returned to it. diff --git a/libavutil/buffer.h b/libavutil/buffer.h index e1ef5b7f07..3eb4eef34c 100644 --- a/libavutil/buffer.h +++ b/libavutil/buffer.h @@ -284,6 +284,11 @@ AVBufferPool *av_buffer_pool_init2(size_t size, void *opaque, AVBufferRef* (*alloc)(void *opaque, size_t size), void (*pool_free)(void *opaque)); +/** + * Free all available buffers in a buffer pool. + */ +void av_buffer_pool_flush(AVBufferPool *pool); + /** * Mark the pool as being available for freeing. It will actually be freed only * once all the allocated buffers associated with the pool are released. Thus it diff --git a/libavutil/version.h b/libavutil/version.h index 6735c20090..dd7d20a9fa 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,8 +79,8 @@ */ #define LIBAVUTIL_VERSION_MAJOR 57 -#define LIBAVUTIL_VERSION_MINOR 24 -#define LIBAVUTIL_VERSION_MICRO 101 +#define LIBAVUTIL_VERSION_MINOR 25 +#define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ LIBAVUTIL_VERSION_MINOR, \ -- 2.35.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".