diff options
author | Anton Khirnov <anton@khirnov.net> | 2021-12-30 15:49:12 +0300 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-02-07 02:31:49 +0300 |
commit | a10f1aec1fe59ff3aee3fb93be44142ba33a5c1d (patch) | |
tree | 3fa16a9228a303912aaf20197a640cbec27f773d /libavutil/fifo.c | |
parent | e6469e68cc06f0a9a6842f250af5e1f9b97876ca (diff) |
avutil/fifo: Deprecate old FIFO API
Users should switch to the superior AVFifo API.
Unfortunately AVFifoBuffer fields cannot be marked as deprecated because
it would trigger a warning wherever fifo.h is #included, due to
inlined av_fifo_peek2().
Diffstat (limited to 'libavutil/fifo.c')
-rw-r--r-- | libavutil/fifo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/fifo.c b/libavutil/fifo.c index 4137ae2fd9..0af0154945 100644 --- a/libavutil/fifo.c +++ b/libavutil/fifo.c @@ -287,6 +287,8 @@ void av_fifo_freep2(AVFifo **f) } +#if FF_API_FIFO_OLD_API +FF_DISABLE_DEPRECATION_WARNINGS #define OLD_FIFO_SIZE_MAX (size_t)FFMIN3(INT_MAX, UINT32_MAX, SIZE_MAX) AVFifoBuffer *av_fifo_alloc_array(size_t nmemb, size_t size) @@ -499,3 +501,5 @@ void av_fifo_drain(AVFifoBuffer *f, int size) f->rptr -= f->end - f->buffer; f->rndx += size; } +FF_ENABLE_DEPRECATION_WARNINGS +#endif |