From ddb6f15186bd063fa087df9027ef9d6f6b281791 Mon Sep 17 00:00:00 2001 From: leslie Date: Fri, 26 Sep 2008 08:13:47 +0800 Subject: [PATCH] improve robustness against bad TS stream --- cam.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cam.c b/cam.c index 0127832..7bd3cfc 100644 --- a/cam.c +++ b/cam.c @@ -2357,6 +2357,7 @@ bool cDeCSA::Decrypt(unsigned char *data, int len, bool force) for(int l=0; l=TS_SIZE) { if(*p!=TS_SYNC_BYTE) { for(int i=1; iCount && p[i+TS_SIZE]==TS_SYNC_BYTE)) ) { Count=i; break; } ringBuffer->Del(Count); esyslog("ERROR: skipped %d bytes to sync on TS packet on device %d",Count,cardIndex); return NULL; -- 2.39.5