summaryrefslogtreecommitdiff
path: root/dvbplayer.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-06-19 08:58:14 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-06-19 08:58:14 +0200
commitb1737a8bcb3a259c9c57e76b818539191b96f045 (patch)
tree8a1274f7b89e37bf127a35af0bfbd0ec44afae5c /dvbplayer.c
parent480afc6bc8636b10849a9e61b73151e81b794f93 (diff)
downloadvdr-b1737a8bcb3a259c9c57e76b818539191b96f045.tar.gz
vdr-b1737a8bcb3a259c9c57e76b818539191b96f045.tar.bz2
Added cDevice::Flush()
Diffstat (limited to 'dvbplayer.c')
-rw-r--r--dvbplayer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/dvbplayer.c b/dvbplayer.c
index c3bd542d..8b60c2e1 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.23 2003/10/18 11:31:54 kls Exp $
+ * $Id: dvbplayer.c 1.24 2004/06/19 08:55:49 kls Exp $
*/
#include "dvbplayer.h"
@@ -418,7 +418,7 @@ void cDvbPlayer::Action(void)
int AudioTrack = 0; // -1 = any, 0 = none, >0 = audioTrack
running = true;
- while (running && (NextFile() || readIndex >= 0 || ringBuffer->Available())) {
+ while (running && (NextFile() || readIndex >= 0 || ringBuffer->Available() || !DeviceFlush(100))) {
cPoller Poller;
if (DevicePoll(Poller, 100)) {
@@ -438,6 +438,10 @@ void cDvbPlayer::Action(void)
continue;
}
else {
+ // hit begin of recording: wait for device buffers to drain
+ // before changing play mode:
+ if (!DeviceFlush(100))
+ continue;
// can't call Play() here, because those functions may only be
// called from the foreground thread - and we also don't need
// to empty the buffer here