Mercurial > libavutil.hg
comparison fifo.c @ 722:2f890bb12bbc libavutil
Implement av_fifo_space().
Patch by Olivier Guilyardi list et samalyse DOT c0m.
author | stefano |
---|---|
date | Thu, 02 Apr 2009 23:22:19 +0000 |
parents | 4e9e0c52ed08 |
children | 9b61454d2fee |
comparison
equal
deleted
inserted
replaced
721:75c89362a6b1 | 722:2f890bb12bbc |
---|---|
50 } | 50 } |
51 | 51 |
52 int av_fifo_size(AVFifoBuffer *f) | 52 int av_fifo_size(AVFifoBuffer *f) |
53 { | 53 { |
54 return (uint32_t)(f->wndx - f->rndx); | 54 return (uint32_t)(f->wndx - f->rndx); |
55 } | |
56 | |
57 int av_fifo_space(AVFifoBuffer *f) | |
58 { | |
59 return f->end - f->buffer - av_fifo_size(f); | |
55 } | 60 } |
56 | 61 |
57 int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size) { | 62 int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size) { |
58 unsigned int old_size= f->end - f->buffer; | 63 unsigned int old_size= f->end - f->buffer; |
59 | 64 |