mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed cRingBufferLinear::Get() in case the buffer wraps around
This commit is contained in:
parent
c4e0e6a54a
commit
a20f952f70
@ -735,6 +735,7 @@ Ludwig Nussel <ludwig.nussel@web.de>
|
||||
for making the plugin library directory configurable via Make.config
|
||||
for reporting a problem on systems that have UTF-8 enabled
|
||||
for pointing out a flaw in the the description of cRingBufferLinear
|
||||
for reporting a bug in cRingBufferLinear::Get() in case the buffer wraps around
|
||||
|
||||
Thomas Koch <tom@harhar.net>
|
||||
for his support in keeping the Premiere World channels up to date in 'channels.conf'
|
||||
|
2
HISTORY
2
HISTORY
@ -2932,3 +2932,5 @@ Video Disk Recorder Revision History
|
||||
Cedric for reporting this one).
|
||||
- Fixed the description of cRingBufferLinear (thanks to Ludwig Nussel for pointing
|
||||
out this one).
|
||||
- Fixed cRingBufferLinear::Get() in case the buffer wraps around (thanks to Ludwig
|
||||
Nussel for reporting this one).
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user