diff options
author | Olivier Guilyardi <list@samalyse.com> | 2009-04-02 23:22:19 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2009-04-02 23:22:19 +0000 |
commit | 7b09db35225e726949f28b59075bc6519f8fdac0 (patch) | |
tree | 4cd6cb49b5bf13593b5fbb96749adaf4d0d90d21 /libavutil/fifo.c | |
parent | a8f9e7f641f9d3a8aae99f23b571623a88283ae6 (diff) | |
download | ffmpeg-7b09db35225e726949f28b59075bc6519f8fdac0.tar.gz |
Implement av_fifo_space().
Patch by Olivier Guilyardi list et samalyse DOT c0m.
Originally committed as revision 18321 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/fifo.c')
-rw-r--r-- | libavutil/fifo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavutil/fifo.c b/libavutil/fifo.c index 52ace0e22c..840b73a57b 100644 --- a/libavutil/fifo.c +++ b/libavutil/fifo.c @@ -54,6 +54,11 @@ int av_fifo_size(AVFifoBuffer *f) return (uint32_t)(f->wndx - f->rndx); } +int av_fifo_space(AVFifoBuffer *f) +{ + return f->end - f->buffer - av_fifo_size(f); +} + int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size) { unsigned int old_size= f->end - f->buffer; |