From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id F330442A96 for ; Tue, 12 Apr 2022 15:53:46 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 64B5468B2C7; Tue, 12 Apr 2022 18:53:35 +0300 (EEST) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AD6CD68B285 for ; Tue, 12 Apr 2022 18:53:29 +0300 (EEST) Received: by mail-wm1-f52.google.com with SMTP id q20so12222176wmq.1 for ; Tue, 12 Apr 2022 08:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+XD8q43cuSHhDiR489P8dPwf8bKdEZmbIb4RGPMwP6M=; b=q3xRsD6wGIts1tntdxbAtY1ddnnU/xycB69j6Sg5xEK48goGm8nRsZH633yo80k8Fv f9UeTsTxVxkr9JlnERaKhVVOG/TKqSrYc+YpaHt0shSdr92UEXNOMjfMALBoEhbxBR4/ huBYTRARVPAU6XvQQAmQAVFOeryRv479NaLji5ysZKob0p4c0PiRcXIxlWetkvpsLOBT BB781+67WwcDfGgLYlY2TM7MZKsBJ9/nrT36D7SVqgUlaA/F2tYGs6ZRLxPGd5RasrFc Fyi21msCu1CspGrHUrFuVwCH7LQrGt/+OQzBLCt42DwFovL4UClt+6P9q7JFJX5Mvy6k +9Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+XD8q43cuSHhDiR489P8dPwf8bKdEZmbIb4RGPMwP6M=; b=XMn26OiMMdp0eH9gYeHSbe+qk8wSW4kkvby3FF5MGILiJjO+LSnekrw+3F4vBAuhN8 HG24OEy6B3GWkPsy6CgmeAojsbl/bkKbGNwJub/X9vqUTcnxRpnxruCRMlzHbIH4OJLg aTJAXrspaJWYJ5QNeNsMMC8ijzdaC9cz7zXuMKaWz1A+N2q031wulcJi/O1GgCRe9Ss9 2G+1Up+dB+kiTO+WbTYOky+qD6zTKbc2BRRHOfZhWnNK5b62/EaaKPyGqLk771EJ0gsb s4gSAi1Hm3+1Seyr9E0kbVdJ7+G5oedHgseS1BUQOn24TOY3vlV95Gp4t3kL7cWGNPQv gQcA== X-Gm-Message-State: AOAM5307Vy7FcrRvwaOhM+Ccz8mKN9enzCea4IRhi4FoVwj9uuePgEx6 3rWVxRzsIVWtWoQWX6cSt0QjKEiS1hc= X-Google-Smtp-Source: ABdhPJyME/kR0ZGP3/UTAwHDwGe8Ms9drxGC8noOjh2nTEMGibX4tEjfg7ftaZ2KMpsJrkqLTlPwnw== X-Received: by 2002:a05:600c:2306:b0:38e:bf1a:a669 with SMTP id 6-20020a05600c230600b0038ebf1aa669mr4582627wmo.11.1649778808724; Tue, 12 Apr 2022 08:53:28 -0700 (PDT) Received: from localhost.localdomain (2a01cb04051815002a7fcffffe8ae6ac.ipv6.abo.wanadoo.fr. [2a01:cb04:518:1500:2a7f:cfff:fe8a:e6ac]) by smtp.gmail.com with ESMTPSA id n2-20020adfb742000000b00205eda3b3c1sm31264590wre.34.2022.04.12.08.53.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 08:53:28 -0700 (PDT) From: xademax@gmail.com To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Apr 2022 17:53:15 +0200 Message-Id: <20220412155316.22417-2-xademax@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220412155316.22417-1-xademax@gmail.com> References: <20220412155316.22417-1-xademax@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 1/2] avutil/buffer: add av_buffer_pool_flush() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Elie ROUDNINSKI , Jonas Karlman Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Jonas Karlman Co-authored-by: Elie ROUDNINSKI --- 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/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-request@ffmpeg.org with subject "unsubscribe".