mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Taking the complete size of available data into account when deciding whether to clear the transfer buffer to avoid overflows
This commit is contained in:
parent
af6b8ff533
commit
f0a7e75d8e
@ -873,6 +873,8 @@ Reinhard Nissl <rnissl@gmx.de>
|
|||||||
for suggesting to make sure the OSD reports oeWrongAlignment errors before any
|
for suggesting to make sure the OSD reports oeWrongAlignment errors before any
|
||||||
oeAreasOverlap error
|
oeAreasOverlap error
|
||||||
for reporting a a crash in the time search mechanism
|
for reporting a a crash in the time search mechanism
|
||||||
|
for taking the complete size of available data into account when deciding whether
|
||||||
|
to clear the transfer buffer to avoid overflows
|
||||||
|
|
||||||
Richard Robson <richard_robson@beeb.net>
|
Richard Robson <richard_robson@beeb.net>
|
||||||
for reporting freezing replay if a timer starts while in Transfer Mode from the
|
for reporting freezing replay if a timer starts while in Transfer Mode from the
|
||||||
|
2
HISTORY
2
HISTORY
@ -3052,3 +3052,5 @@ Video Disk Recorder Revision History
|
|||||||
- Removed the usleep() call from cDvbPlayer::Action() to make VDR run on NPTL
|
- Removed the usleep() call from cDvbPlayer::Action() to make VDR run on NPTL
|
||||||
systems (thanks to Alfred Zastrow). The NPTL check at startup has also been
|
systems (thanks to Alfred Zastrow). The NPTL check at startup has also been
|
||||||
removed.
|
removed.
|
||||||
|
- Taking the complete size of available data into account when deciding whether
|
||||||
|
to clear the transfer buffer to avoid overflows (thanks to Reinhard Nissl).
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: transfer.c 1.17 2004/10/16 09:22:58 kls Exp $
|
* $Id: transfer.c 1.18 2004/10/23 13:35:08 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "transfer.h"
|
#include "transfer.h"
|
||||||
@ -65,7 +65,7 @@ void cTransfer::Action(void)
|
|||||||
int Count;
|
int Count;
|
||||||
uchar *b = ringBuffer->Get(Count);
|
uchar *b = ringBuffer->Get(Count);
|
||||||
if (b) {
|
if (b) {
|
||||||
if (Count > TRANSFERBUFSIZE * 2 / 3) {
|
if (ringBuffer->Available() > TRANSFERBUFSIZE * 9 / 10) {
|
||||||
// If the buffer runs full, we have no chance of ever catching up
|
// If the buffer runs full, we have no chance of ever catching up
|
||||||
// since the data comes in at the same rate as it goes out (it's "live").
|
// since the data comes in at the same rate as it goes out (it's "live").
|
||||||
// So let's clear the buffer instead of suffering from permanent
|
// So let's clear the buffer instead of suffering from permanent
|
||||||
|
Loading…
Reference in New Issue
Block a user