From: joeuser Date: Thu, 6 Dec 2018 23:30:43 +0000 (+0100) Subject: Don't warn on packets with small/no payload. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7d4b7c48f7a69b1628b75f7c27f6c6c274cf202;p=thirdparty%2Ftvheadend.git Don't warn on packets with small/no payload. --- diff --git a/src/descrambler/tvhcsa.c b/src/descrambler/tvhcsa.c index 4e9680c16..1deefc50f 100644 --- a/src/descrambler/tvhcsa.c +++ b/src/descrambler/tvhcsa.c @@ -122,11 +122,13 @@ tvhcsa_csa_cbc_descramble ev_od = pkt[3] & 0x40; pkt[3] &= 0x3f; // consider it decrypted now if(pkt[3] & 0x20) { // incomplete packet + if(!(pkt[3] & 0x10)) // no payload - but why scrambled??? + break; offset = 4 + pkt[4] + 1; - if (offset > 188-8){ // invalid offset (residue handling?) - if (tvhlog_limit(&csa->tvhcsa_loglimit, 10)) - tvhwarn(LS_CSA, "invalid payload offset in packet for service \"%s\" (offset=%d pkt[3]=0x%02x pkt[4]=0x%02x)", - ((mpegts_service_t *)s)->s_dvb_svcname, (int)offset, pkt[3], pkt[4]); + if (offset >= 188){ // invalid offset (residue handling?) + if (tvhlog_limit(&csa->tvhcsa_loglimit, 30)) + tvhtrace(LS_CSA, "invalid payload offset in packet for service \"%s\" (offset=%d pkt[3]=0x%02x pkt[4]=0x%02x)", + ((mpegts_service_t *)s)->s_dvb_svcname, (int)offset, pkt[3], pkt[4]); break; // no more processing } len = 188 - offset;