mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-24 01:14:05 +08:00
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().
This commit is contained in:

committed by
Andreas Rheinhardt

parent
e6469e68cc
commit
a10f1aec1f
@@ -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
|
||||
|
Reference in New Issue
Block a user