summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dvbdevice.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index 175d708d..726159ff 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 2.46 2011/09/17 11:41:01 kls Exp $
+ * $Id: dvbdevice.c 2.47 2011/09/17 12:53:46 kls Exp $
*/
#include "dvbdevice.h"
@@ -32,6 +32,8 @@
#define ATSC_TUNE_TIMEOUT 9000 //ms
#define ATSC_LOCK_TIMEOUT 2000 //ms
+#define SCR_RANDOM_TIMEOUT 500 // ms (add random value up to this when tuning SCR device to avoid lockups)
+
// --- DVB Parameter Maps ----------------------------------------------------
const tDvbParameterMap InversionValues[] = {
@@ -663,7 +665,7 @@ void cDvbTuner::Action(void)
break;
case tsSet:
tunerStatus = SetFrontend() ? tsTuned : tsIdle;
- Timer.Set(tuneTimeout);
+ Timer.Set(tuneTimeout + (scr ? rand() % SCR_RANDOM_TIMEOUT : 0));
continue;
case tsTuned:
if (Timer.TimedOut()) {