Lines Matching refs:size
27 static AVFifoBuffer *fifo_alloc_common(void *buffer, size_t size)
38 f->end = f->buffer + size;
43 AVFifoBuffer *av_fifo_alloc(unsigned int size)
45 void *buffer = av_malloc(size);
46 return fifo_alloc_common(buffer, size);
49 AVFifoBuffer *av_fifo_alloc_array(size_t nmemb, size_t size)
51 void *buffer = av_malloc_array(nmemb, size);
52 return fifo_alloc_common(buffer, nmemb * size);
107 int av_fifo_grow(AVFifoBuffer *f, unsigned int size)
110 if(size + (unsigned)av_fifo_size(f) < size)
113 size += av_fifo_size(f);
115 if (old_size < size)
116 return av_fifo_realloc2(f, FFMAX(size, 2*size));
122 int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size,
125 int total = size;
130 int len = FFMIN(f->end - wptr, size);
143 size -= len;
144 } while (size > 0);
147 return total - size;
170 void av_fifo_drain(AVFifoBuffer *f, int size)
172 av_assert2(av_fifo_size(f) >= size);
173 f->rptr += size;
176 f->rndx += size;