diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2014-01-14 14:39:59 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2014-01-14 14:39:59 +0100 |
commit | 1d869c4b36d1e1a48a9a3acb6bad58f952302cc0 (patch) | |
tree | 41689d7d4ddd2b52fbdf5536eda09b47d1340442 | |
parent | e7c86c676017a75f4c3d522a341ed95057be6820 (diff) | |
download | vdr-1d869c4b36d1e1a48a9a3acb6bad58f952302cc0.tar.gz vdr-1d869c4b36d1e1a48a9a3acb6bad58f952302cc0.tar.bz2 |
Fixed sending CA descriptors to CAMs in case a cReceiver is not used for a recording or live view, like e.g. streaming clients
-rw-r--r-- | CONTRIBUTORS | 4 | ||||
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | ci.c | 17 |
3 files changed, 19 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 757ae32e..a356b2cd 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3237,3 +3237,7 @@ Thomas Reufer <thomas@reufer.ch> for suggesting to add an additional parameter named Forward to cDevice::TrickSpeed() for suggesting to add a note to ePlayMode in device.h that VDR itself always uses pmAudioVideo when replaying a recording + +Mariusz Bialonczyk <manio@skyboo.net> + for fixing sending CA descriptors to CAMs in case a cReceiver is not used for a + recording or live view, like e.g. streaming clients @@ -8140,3 +8140,5 @@ Video Disk Recorder Revision History - Improved locking for CAM slots and made the pure functions of cCiAdapter have default implementations, to fix a possible crash with CI adapters and CAM slots that are implemented in a plugin. +- Fixed sending CA descriptors to CAMs in case a cReceiver is not used for a + recording or live view, like e.g. streaming clients (thanks to Mariusz Bialonczyk). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: ci.c 3.5 2014/01/14 12:03:37 kls Exp $ + * $Id: ci.c 3.6 2014/01/14 14:36:29 kls Exp $ */ #include "ci.h" @@ -592,6 +592,7 @@ private: int transponder; int programNumber; int caSystemIds[MAXCASYSTEMIDS + 1]; // list is zero terminated! + bool gotCaDescriptors; void AddCaDescriptors(int Length, const uint8_t *Data); public: cCiCaPmt(uint8_t CmdId, int Source, int Transponder, int ProgramNumber, const int *CaSystemIds); @@ -599,10 +600,12 @@ public: void SetListManagement(uint8_t ListManagement); uint8_t ListManagement(void) { return capmt[0]; } void AddPid(int Pid, uint8_t StreamType); + bool GotCaDescriptors(void) { return gotCaDescriptors; } }; cCiCaPmt::cCiCaPmt(uint8_t CmdId, int Source, int Transponder, int ProgramNumber, const int *CaSystemIds) { + gotCaDescriptors = false; cmdId = CmdId; source = Source; transponder = Transponder; @@ -658,6 +661,7 @@ void cCiCaPmt::AddCaDescriptors(int Length, const uint8_t *Data) int l = length - esInfoLengthPos - 2; capmt[esInfoLengthPos] = (l >> 8) & 0xFF; capmt[esInfoLengthPos + 1] = l & 0xFF; + gotCaDescriptors = true; } } else @@ -1812,6 +1816,7 @@ cCiEnquiry *cCamSlot::GetEnquiry(void) void cCamSlot::SendCaPmt(uint8_t CmdId) { cMutexLock MutexLock(&mutex); + bool needResend = false; cCiConditionalAccessSupport *cas = (cCiConditionalAccessSupport *)GetSessionByResourceId(RI_CONDITIONAL_ACCESS_SUPPORT); if (cas) { const int *CaSystemIds = cas->GetCaSystemIds(); @@ -1844,8 +1849,12 @@ void cCamSlot::SendCaPmt(uint8_t CmdId) } if (cas->RepliesToQuery()) CaPmt.SetListManagement(Active ? CPLM_ADD : CPLM_UPDATE); - if (Active || cas->RepliesToQuery()) - cas->SendPMT(&CaPmt); + if (Active || cas->RepliesToQuery()) { + if ((CaPmt.ListManagement() == CPLM_ADD || CaPmt.ListManagement() == CPLM_ONLY) && !CaPmt.GotCaDescriptors()) + needResend = true; + else + cas->SendPMT(&CaPmt); + } p->modified = false; } } @@ -1855,7 +1864,7 @@ void cCamSlot::SendCaPmt(uint8_t CmdId) if (cDevice *d = Device()) d->AttachReceiver(caPidReceiver); } - resendPmt = false; + resendPmt = needResend; } else { cCiCaPmt CaPmt(CmdId, 0, 0, 0, NULL); |