Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-05-11 21:10:10 +0300
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-05-11 21:13:03 +0300
commit96d616052b3d39678e477fa10610ca688f46fff9 (patch)
tree8bd31d06318bc786ea8f1d84f92090c9c860bc11 /libavutil/fifo.c
parent27506aceda8115f82f89691a4441d62a8cf24a6e (diff)
parentd12b5b2f135aade4099f4b26b0fe678656158c13 (diff)
Merge commit 'd12b5b2f135aade4099f4b26b0fe678656158c13'
* commit 'd12b5b2f135aade4099f4b26b0fe678656158c13': build: Split test programs off into separate files Some conversions done by: James Almer <jamrial@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavutil/fifo.c')
-rw-r--r--libavutil/fifo.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/libavutil/fifo.c b/libavutil/fifo.c
index 7bd48a2271..986729aedb 100644
--- a/libavutil/fifo.c
+++ b/libavutil/fifo.c
@@ -238,60 +238,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");
-
- /* peek_at at FIFO */
- n = av_fifo_size(fifo) / sizeof(int);
- for (i = 0; i < n; i++) {
- av_fifo_generic_peek_at(fifo, &j, i * sizeof(int), sizeof(j), NULL);
- printf("%d: %d\n", i, j);
- }
- 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");
-
- /* test *ndx overflow */
- av_fifo_reset(fifo);
- fifo->rndx = fifo->wndx = ~(uint32_t)0 - 5;
-
- /* fill data */
- for (i = 0; av_fifo_space(fifo) >= sizeof(int); i++)
- av_fifo_generic_write(fifo, &i, sizeof(int), NULL);
-
- /* peek_at at FIFO */
- n = av_fifo_size(fifo) / sizeof(int);
- for (i = 0; i < n; i++) {
- av_fifo_generic_peek_at(fifo, &j, i * sizeof(int), sizeof(j), NULL);
- printf("%d: %d\n", i, j);
- }
-
- av_fifo_free(fifo);
-
- return 0;
-}
-
-#endif