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 EA5D342C43 for ; Sun, 29 Jan 2023 10:18:14 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A60C768BC90; Sun, 29 Jan 2023 12:17:57 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 20AE368B1E4 for ; Sun, 29 Jan 2023 12:17:49 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id D37AE2404EC for ; Sun, 29 Jan 2023 11:17:48 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id CotaLd5ZVDam for ; Sun, 29 Jan 2023 11:17:48 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id B9DE82404EE for ; Sun, 29 Jan 2023 11:17:47 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 5D8CF3A0344 for ; Sun, 29 Jan 2023 11:17:47 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Jan 2023 11:17:34 +0100 Message-Id: <20230129101735.14173-2-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230129101735.14173-1-anton@khirnov.net> References: <20230116133840.512-1-jamrial@gmail.com> <20230129101735.14173-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] lavu/fifo: uninline deprecated av_fifo_peek2() 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 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: Will allow to mark AVFifoBuffer fields as deprecated without triggering spurious warnings. --- libavutil/fifo.c | 10 ++++++++++ libavutil/fifo.h | 10 +--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/libavutil/fifo.c b/libavutil/fifo.c index 51a5af6f39..5b114fc808 100644 --- a/libavutil/fifo.c +++ b/libavutil/fifo.c @@ -506,5 +506,15 @@ void av_fifo_drain(AVFifoBuffer *f, int size) f->rptr -= f->end - f->buffer; f->rndx += size; } + +uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs) +{ + uint8_t *ptr = f->rptr + offs; + if (ptr >= f->end) + ptr = f->buffer + (ptr - f->end); + else if (ptr < f->buffer) + ptr = f->end - (f->buffer - ptr); + return ptr; +} FF_ENABLE_DEPRECATION_WARNINGS #endif diff --git a/libavutil/fifo.h b/libavutil/fifo.h index 0a1ea70a60..ed86800da4 100644 --- a/libavutil/fifo.h +++ b/libavutil/fifo.h @@ -428,15 +428,7 @@ void av_fifo_drain(AVFifoBuffer *f, int size); * @deprecated use the new AVFifo-API with av_fifo_peek() or av_fifo_peek_to_cb() */ attribute_deprecated -static inline uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs) -{ - uint8_t *ptr = f->rptr + offs; - if (ptr >= f->end) - ptr = f->buffer + (ptr - f->end); - else if (ptr < f->buffer) - ptr = f->end - (f->buffer - ptr); - return ptr; -} +uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs); #endif /** -- 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".