diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-01-17 20:11:23 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-01-17 20:11:23 +0000 |
commit | 3da97cfdfc4f4217e1629ea509a997f3b1bf7039 (patch) | |
tree | 7580aeb0bfebe7b4306f321c71a27c29dcc62ca1 /libavutil/fifo.c | |
parent | 0726982cdb974dc026aebafb2db510283a166201 (diff) | |
download | ffmpeg-3da97cfdfc4f4217e1629ea509a997f3b1bf7039.tar.gz |
avoid code duplication
Originally committed as revision 7573 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/fifo.c')
-rw-r--r-- | libavutil/fifo.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavutil/fifo.c b/libavutil/fifo.c index 276eeb7463..635df2dbf8 100644 --- a/libavutil/fifo.c +++ b/libavutil/fifo.c @@ -99,9 +99,7 @@ int av_fifo_generic_read(AVFifoBuffer *f, int buf_size, void (*func)(void*, void memcpy(dest, f->rptr, len); dest = (uint8_t*)dest + len; } - f->rptr += len; - if (f->rptr >= f->end) - f->rptr = f->buffer; + av_fifo_drain(f, len); buf_size -= len; } return 0; |