aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/tests/fifo.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-12-30 13:02:38 +0100
committerAnton Khirnov <anton@khirnov.net>2022-01-10 16:04:19 +0100
commit63b013aa687662440c85ecff8fdc087123025bf6 (patch)
treea364c860031738736685911e2265f27367b9b477 /libavutil/tests/fifo.c
parentd47dc0b0dfcc6010a57d4f2510c90b800ed40efc (diff)
downloadffmpeg-63b013aa687662440c85ecff8fdc087123025bf6.tar.gz
lavu/fifo: deprecate av_fifo_peek2()
It returns a pointer inside the fifo's buffer, which cannot be safely used without accessing AVFifoBuffer internals. It is easier and safer to use av_fifo_generic_peek_at().
Diffstat (limited to 'libavutil/tests/fifo.c')
-rw-r--r--libavutil/tests/fifo.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/libavutil/tests/fifo.c b/libavutil/tests/fifo.c
index 8a550e088b..a17d913233 100644
--- a/libavutil/tests/fifo.c
+++ b/libavutil/tests/fifo.c
@@ -30,14 +30,6 @@ int main(void)
for (i = 0; av_fifo_space(fifo) >= sizeof(int); i++)
av_fifo_generic_write(fifo, &i, sizeof(int), NULL);
- /* peek at FIFO */
- n = av_fifo_size(fifo) / sizeof(int);
- for (i = -n + 1; i < n; i++) {
- int *v = (int *)av_fifo_peek2(fifo, i * sizeof(int));
- printf("%d: %d\n", i, *v);
- }
- printf("\n");
-
/* peek_at at FIFO */
n = av_fifo_size(fifo) / sizeof(int);
for (i = 0; i < n; i++) {