summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann Friedrichs <johann.friedrichs@web.de>2021-12-10 21:20:29 +0100
committerJohann Friedrichs <johann.friedrichs@web.de>2021-12-10 21:20:29 +0100
commitad5448e5ad52d0084af3da9e57f9074df79b2db0 (patch)
tree4d0e250940de2fc88dd7891133f430a1384f5b58
parent4edcf040893f9057e89e798f18a4e63a5c8fbb50 (diff)
downloadvdr-plugin-epgsearch-ad5448e5ad52d0084af3da9e57f9074df79b2db0.tar.gz
vdr-plugin-epgsearch-ad5448e5ad52d0084af3da9e57f9074df79b2db0.tar.bz2
Wrong dev selection for conflict check
-rw-r--r--conflictcheck.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/conflictcheck.c b/conflictcheck.c
index f890e37..835346a 100644
--- a/conflictcheck.c
+++ b/conflictcheck.c
@@ -704,10 +704,11 @@ int cConflictCheck::GetDevice(cConflictCheckTimerObj* TimerObj, bool* NeedsDetac
imp |= devices[i].Receiving();
// do we have GetClippedNumProvidedSystems ??? uses MaxNumProvidedSystems in vdr since V1.7 !!
// but should not be needed
- imp <<= 2;
- imp |= devices[i].NumProvidedSystems(); // avoid cards which support multiple delivery systems
- // imp <<= 2;
- // imp |= GetClippedNumProvidedSystems(2, device[i]) - 1; // avoid cards which support multiple delivery systems
+ imp <<= 5; // headroom for 31 Systems
+ int ProvidedSystems=devices[i].NumProvidedSystems();
+ if (ProvidedSystems <= 0) // invalid return
+ ProvidedSystems = 1;
+ imp |= std::min(ProvidedSystems,31); // avoid cards which support multiple delivery systems
// use the device with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used)
imp <<= 8;
imp |= std::min(std::max(devices[i].Priority() + MAXPRIORITY, 0), 0xFF);