diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2017-04-15 09:39:55 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2017-04-15 09:39:55 +0200 |
commit | 1a160e7afeddd6a2479a40ee6110477093942707 (patch) | |
tree | 757f2ac9c91c8399c7f652ce37a70fbd8ebde495 /dvbdevice.c | |
parent | 016e10c1b0d20b8c73b593afcaf492219b5a0064 (diff) | |
download | vdr-1a160e7afeddd6a2479a40ee6110477093942707.tar.gz vdr-1a160e7afeddd6a2479a40ee6110477093942707.tar.bz2 |
The function cCamSlot::Decrypt() can now also be called with Data == NULL
Diffstat (limited to 'dvbdevice.c')
-rw-r--r-- | dvbdevice.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/dvbdevice.c b/dvbdevice.c index 9bf15b71..7775465d 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 4.5 2017/04/06 17:02:35 kls Exp $ + * $Id: dvbdevice.c 4.6 2017/04/14 10:05:15 kls Exp $ */ #include "dvbdevice.h" @@ -1187,6 +1187,7 @@ cDvbDevice::cDvbDevice(int Adapter, int Frontend) fd_ca = DvbOpen(DEV_DVB_CA, adapter, frontend, O_RDWR); if (fd_ca >= 0) ciAdapter = cDvbCiAdapter::CreateCiAdapter(this, fd_ca); + checkTsBuffer = false; // The DVR device (will be opened and closed as needed): @@ -1763,11 +1764,12 @@ bool cDvbDevice::GetTSPacket(uchar *&Data) if (cCamSlot *cs = CamSlot()) { if (cs->WantsTsData()) { int Available; - Data = tsBuffer->Get(&Available); - if (Data) { - Data = cs->Decrypt(Data, Available); - tsBuffer->Skip(Available); - } + Data = tsBuffer->Get(&Available, checkTsBuffer); + if (!Data) + Available = 0; + Data = cs->Decrypt(Data, Available); + tsBuffer->Skip(Available); + checkTsBuffer = Data != NULL; return true; } } |