From 1a160e7afeddd6a2479a40ee6110477093942707 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 15 Apr 2017 09:39:55 +0200 Subject: The function cCamSlot::Decrypt() can now also be called with Data == NULL --- device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'device.c') 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) { -- cgit v1.2.3