]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Don't warn on packets with small/no payload.
authorjoeuser <joeusercz@goglemail.co>
Thu, 6 Dec 2018 23:30:43 +0000 (00:30 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sun, 9 Dec 2018 15:59:34 +0000 (16:59 +0100)
src/descrambler/tvhcsa.c

index 4e9680c16a6ebc1944db292d6c56b2f6711ef65b..1deefc50f42ef432c693cab2e99e6732d09ecb1c 100644 (file)
@@ -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;