summaryrefslogtreecommitdiff
path: root/ringbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'ringbuffer.c')
-rw-r--r--ringbuffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ringbuffer.c b/ringbuffer.c
index 6f26748..b52c37e 100644
--- a/ringbuffer.c
+++ b/ringbuffer.c
@@ -7,7 +7,7 @@
* Parts of this file were inspired by the 'ringbuffy.c' from the
* LinuxDVB driver (see linuxtv.org).
*
- * $Id: ringbuffer.c 1.19 2004/03/07 13:46:51 kls Exp $
+ * $Id: ringbuffer.c 1.20 2004/06/19 12:27:56 kls Exp $
*/
#include "ringbuffer.h"
@@ -181,6 +181,7 @@ uchar *cRingBufferLinear::Get(int &Count)
int t = margin - rest;
memcpy(buffer + t, buffer + tail, rest);
tail = t;
+ rest = head - tail;
}
int diff = head - tail;
int cont = (diff >= 0) ? diff : Size() + diff - margin;