From bff17fb1d0e39583e44ba93ea214d7434ecef2ce Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 3 Aug 2001 14:18:08 +0200 Subject: Added support for replaying DVDs --- ringbuffer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ringbuffer.c') diff --git a/ringbuffer.c b/ringbuffer.c index 8511a1c2..79ece885 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.2 2001/05/20 11:58:08 kls Exp $ + * $Id: ringbuffer.c 1.3 2001/08/02 13:48:38 kls Exp $ */ #include "ringbuffer.h" @@ -69,9 +69,8 @@ int cRingBuffer::Available(void) { mutex.Lock(); int diff = head - tail; - int cont = (diff >= 0) ? diff : size + diff; mutex.Unlock(); - return cont; + return (diff >= 0) ? diff : size + diff; } void cRingBuffer::Clear(void) -- cgit v1.2.3