summaryrefslogtreecommitdiff
path: root/recorder.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-01-08 11:03:44 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-01-08 11:03:44 +0100
commit4016a630be81dfad59bea81d6ff294c4c4846a46 (patch)
tree1ad89326082ba5259b98becb336c0e80634ba1e4 /recorder.c
parent3a5c65e59403a4cc9c23d0ae2e5b194a4073e26e (diff)
downloadvdr-4016a630be81dfad59bea81d6ff294c4c4846a46.tar.gz
vdr-4016a630be81dfad59bea81d6ff294c4c4846a46.tar.bz2
Added a SleepMs() in cRecorder::Action() to avoid a busy loop
Diffstat (limited to 'recorder.c')
-rw-r--r--recorder.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/recorder.c b/recorder.c
index 35a8e56d..8bb16212 100644
--- a/recorder.c
+++ b/recorder.c
@@ -4,13 +4,13 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recorder.c 1.16 2005/10/31 12:35:29 kls Exp $
+ * $Id: recorder.c 1.17 2006/01/08 11:01:25 kls Exp $
*/
+#include "recorder.h"
#include <stdarg.h>
#include <stdio.h>
#include <unistd.h>
-#include "recorder.h"
#define RECORDERBUFSIZE MEGABYTE(5)
@@ -171,6 +171,8 @@ void cRecorder::Action(void)
int Count = remux->Put(b, r);
if (Count)
ringBuffer->Del(Count);
+ else
+ cCondWait::SleepMs(100); // avoid busy loop when resultBuffer is full in cRemux::Put()
}
}
}