mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed calculating the cache size in cUnbufferedFile::Read()
This commit is contained in:
parent
09386e621d
commit
af9266d21c
@ -274,6 +274,7 @@ Artur Skawina <skawina@geocities.com>
|
|||||||
for pointing out a problem with the ERR macro defined by ncurses.h
|
for pointing out a problem with the ERR macro defined by ncurses.h
|
||||||
for a patch that contained a fix for checking toFile in cCuttingThread::Action()
|
for a patch that contained a fix for checking toFile in cCuttingThread::Action()
|
||||||
for improving cUnbufferedFile
|
for improving cUnbufferedFile
|
||||||
|
for fixing calculating the cache size in cUnbufferedFile::Read()
|
||||||
|
|
||||||
Werner Fink <werner@suse.de>
|
Werner Fink <werner@suse.de>
|
||||||
for making I/O more robust by handling EINTR
|
for making I/O more robust by handling EINTR
|
||||||
|
3
HISTORY
3
HISTORY
@ -4716,7 +4716,7 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed automatically updating the CAM menu in case the whole operation (for
|
- Fixed automatically updating the CAM menu in case the whole operation (for
|
||||||
instance a firmware update) takes longer than the menu timeout.
|
instance a firmware update) takes longer than the menu timeout.
|
||||||
|
|
||||||
2006-05-25: Version 1.4.0-2
|
2006-05-26: Version 1.4.0-2
|
||||||
|
|
||||||
- Removed leftover LSMOD=... line from 'runvdr'.
|
- Removed leftover LSMOD=... line from 'runvdr'.
|
||||||
- Modified the Makefile to copy additional libraries a plugin might provide (suggested
|
- Modified the Makefile to copy additional libraries a plugin might provide (suggested
|
||||||
@ -4734,3 +4734,4 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed handling the running status of EPG events in case the "Schedule" menu is
|
- Fixed handling the running status of EPG events in case the "Schedule" menu is
|
||||||
currently open (i.e. a write lock on the schedules data can't be achieved).
|
currently open (i.e. a write lock on the schedules data can't be achieved).
|
||||||
- Fixed handling VPS timers in case the EPG event hasn't been 'seen' in a while.
|
- Fixed handling VPS timers in case the EPG event hasn't been 'seen' in a while.
|
||||||
|
- Fixed calculating the cache size in cUnbufferedFile::Read() (thanks to Artur Skawina).
|
||||||
|
4
tools.c
4
tools.c
@ -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: tools.c 1.117 2006/04/21 15:12:47 kls Exp $
|
* $Id: tools.c 1.118 2006/05/26 10:10:31 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
@ -1179,7 +1179,7 @@ ssize_t cUnbufferedFile::Read(void *Data, size_t Size)
|
|||||||
}
|
}
|
||||||
else if (cachedend > ahead && cachedend - curpos > READCHUNK * 2) {
|
else if (cachedend > ahead && cachedend - curpos > READCHUNK * 2) {
|
||||||
// current position has moved back enough, shrink head window.
|
// current position has moved back enough, shrink head window.
|
||||||
FadviseDrop(curpos + READCHUNK, cachedend - curpos + READCHUNK);
|
FadviseDrop(curpos + READCHUNK, cachedend - (curpos + READCHUNK));
|
||||||
cachedend = curpos + READCHUNK;
|
cachedend = curpos + READCHUNK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user