summaryrefslogtreecommitdiff
path: root/libavutil/fifo.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/fifo.c')
-rw-r--r--libavutil/fifo.c4
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;