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-requ...@ffmpeg.org with subject "unsubscribe".