summaryrefslogtreecommitdiff
path: root/dvbplayer.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-05-08 14:07:00 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-05-08 14:07:00 +0200
commitf429e2eab08ba2a07bc791c3fd9f0860d85b82a0 (patch)
treeaeac9d0b5ded1f7c5fca112d00d28ae20c86aaaf /dvbplayer.c
parent7f5f26020bcedd5a1fd1ae73b8dcebafe2fb9b39 (diff)
downloadvdr-f429e2eab08ba2a07bc791c3fd9f0860d85b82a0.tar.gz
vdr-f429e2eab08ba2a07bc791c3fd9f0860d85b82a0.tar.bz2
Moved the sleep in cDvbPlayer::Action() outside the locked area to avoid problems on NPTL systems
Diffstat (limited to 'dvbplayer.c')
-rw-r--r--dvbplayer.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/dvbplayer.c b/dvbplayer.c
index 5d2370cb..e774102e 100644
--- a/dvbplayer.c
+++ b/dvbplayer.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbplayer.c 1.32 2005/05/08 13:51:00 kls Exp $
+ * $Id: dvbplayer.c 1.33 2005/05/08 14:07:00 kls Exp $
*/
#include "dvbplayer.h"
@@ -372,9 +372,14 @@ void cDvbPlayer::Action(void)
nonBlockingFileReader = new cNonBlockingFileReader;
int Length = 0;
+ bool Sleep = false;
running = true;
while (running && (NextFile() || readIndex >= 0 || ringBuffer->Available() || !DeviceFlush(100))) {
+ if (Sleep) {
+ cCondWait::SleepMs(3); // this keeps the CPU load low
+ Sleep = false;
+ }
cPoller Poller;
if (DevicePoll(Poller, 100)) {
@@ -449,7 +454,7 @@ void cDvbPlayer::Action(void)
}
}
else
- cCondWait::SleepMs(3); // this keeps the CPU load low
+ Sleep = true;
// Get the next frame from the buffer: