summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-01-07 15:16:09 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-01-07 15:16:09 +0100
commite8ee9a1c4b26c38a46e5872a62cb020473c949c9 (patch)
tree34b11f6209fef8a2269d2b80dbb85724b85ddd42 /dvbdevice.c
parente0d5ebf8fd1d508776d63026a9dd336fbb0d648d (diff)
downloadvdr-e8ee9a1c4b26c38a46e5872a62cb020473c949c9.tar.gz
vdr-e8ee9a1c4b26c38a46e5872a62cb020473c949c9.tar.bz2
Adapted c(Dvb)Device::ProvidesCa() to the dynamic CA handling
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index 52c52cea..7fa39cce 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 1.148 2006/01/07 14:05:59 kls Exp $
+ * $Id: dvbdevice.c 1.149 2006/01/07 15:15:01 kls Exp $
*/
#include "dvbdevice.h"
@@ -503,13 +503,21 @@ bool cDvbDevice::Ready(void)
int cDvbDevice::ProvidesCa(const cChannel *Channel) const
{
- if (Channel->Ca() >= CA_ENCRYPTED_MIN && ciHandler) {
- unsigned short ids[MAXCAIDS + 1];
- for (int i = 0; i <= MAXCAIDS; i++) // '<=' copies the terminating 0!
- ids[i] = Channel->Ca(i);
- return ciHandler->ProvidesCa(ids);
+ int NumCams = 0;
+ if (ciHandler) {
+ NumCams = ciHandler->NumCams();
+ if (Channel->Ca() >= CA_ENCRYPTED_MIN) {
+ unsigned short ids[MAXCAIDS + 1];
+ for (int i = 0; i <= MAXCAIDS; i++) // '<=' copies the terminating 0!
+ ids[i] = Channel->Ca(i);
+ if (ciHandler->ProvidesCa(ids))
+ return NumCams + 1;
+ }
}
- return cDevice::ProvidesCa(Channel);
+ int result = cDevice::ProvidesCa(Channel);
+ if (result > 0)
+ result += NumCams;
+ return result;
}
cSpuDecoder *cDvbDevice::GetSpuDecoder(void)