summaryrefslogtreecommitdiff
path: root/libavutil/fifo.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2016-03-17 19:13:17 +0100
committerDiego Biurrun <diego@biurrun.de>2016-04-07 16:14:42 +0200
commitd12b5b2f135aade4099f4b26b0fe678656158c13 (patch)
treed5b44fd428a1c68213fe51aca21b5819bce3d33a /libavutil/fifo.c
parent330177b508420a553083df94f22cbd5142de0f4a (diff)
build: Split test programs off into separate files
This avoids spurious library rebuilds when only the test program code is changed and simplifies the build system.
Diffstat (limited to 'libavutil/fifo.c')
-rw-r--r--libavutil/fifo.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/libavutil/fifo.c b/libavutil/fifo.c
index dffaf54533..a42899c2b3 100644
--- a/libavutil/fifo.c
+++ b/libavutil/fifo.c
@@ -131,37 +131,3 @@ void av_fifo_drain(AVFifoBuffer *f, int size)
f->rptr -= f->end - f->buffer;
f->rndx += size;
}
-
-#ifdef TEST
-
-int main(void)
-{
- /* create a FIFO buffer */
- AVFifoBuffer *fifo = av_fifo_alloc(13 * sizeof(int));
- int i, j, n;
-
- /* fill data */
- 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");
-
- /* read data */
- for (i = 0; av_fifo_size(fifo) >= sizeof(int); i++) {
- av_fifo_generic_read(fifo, &j, sizeof(int), NULL);
- printf("%d ", j);
- }
- printf("\n");
-
- av_fifo_free(fifo);
-
- return 0;
-}
-
-#endif