Fixed high CPU usage in transfer mode

This commit is contained in:
Klaus Schmidinger 2002-03-16 14:27:35 +01:00
parent 25abe47a3b
commit f7d6a96935
2 changed files with 3 additions and 2 deletions

View File

@ -1106,3 +1106,4 @@ Video Disk Recorder Revision History
- The "Left" and "Right" keys are now used to page up and down in text displays - The "Left" and "Right" keys are now used to page up and down in text displays
(like the EPG descriptions or the results of commands executed from the (like the EPG descriptions or the results of commands executed from the
"Commands" menu). "Commands" menu).
- Fixed high CPU usage in transfer mode.

View File

@ -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: dvbapi.c 1.162 2002/03/10 11:01:38 kls Exp $ * $Id: dvbapi.c 1.163 2002/03/16 14:20:47 kls Exp $
*/ */
#include "dvbapi.h" #include "dvbapi.h"
@ -1411,7 +1411,7 @@ void cTransferBuffer::Output(void)
int r = Get(b, sizeof(b)); int r = Get(b, sizeof(b));
if (r > 0) { if (r > 0) {
uchar *p = b; uchar *p = b;
while (r > 0 && Busy()) { while (r > 0 && Busy() && cFile::FileReadyForWriting(toDevice, 100)) {
int w = write(toDevice, p, r); int w = write(toDevice, p, r);
if (w > 0) { if (w > 0) {
p += w; p += w;