summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-04-15 09:39:55 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-04-15 09:39:55 +0200
commit1a160e7afeddd6a2479a40ee6110477093942707 (patch)
tree757f2ac9c91c8399c7f652ce37a70fbd8ebde495 /device.c
parent016e10c1b0d20b8c73b593afcaf492219b5a0064 (diff)
downloadvdr-1a160e7afeddd6a2479a40ee6110477093942707.tar.gz
vdr-1a160e7afeddd6a2479a40ee6110477093942707.tar.bz2
The function cCamSlot::Decrypt() can now also be called with Data == NULL
Diffstat (limited to 'device.c')
-rw-r--r--device.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/device.c b/device.c
index 1c7f2225..38eb77f3 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 4.12 2017/04/02 10:08:49 kls Exp $
+ * $Id: device.c 4.13 2017/04/14 09:38:42 kls Exp $
*/
#include "device.h"
@@ -1860,13 +1860,15 @@ void cTSBuffer::Action(void)
}
}
-uchar *cTSBuffer::Get(int *Available)
+uchar *cTSBuffer::Get(int *Available, bool CheckAvailable)
{
int Count = 0;
if (delivered) {
ringBuffer->Del(TS_SIZE);
delivered = false;
}
+ if (CheckAvailable && ringBuffer->Available() < TS_SIZE)
+ return NULL;
uchar *p = ringBuffer->Get(Count);
if (p && Count >= TS_SIZE) {
if (*p != TS_SYNC_BYTE) {