]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
dvb psi: fix the start indicator for mpegts_psi_section_reassemble0 plus cosmetic...
authorJaroslav Kysela <perex@perex.cz>
Thu, 3 Aug 2017 13:23:24 +0000 (15:23 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 3 Aug 2017 13:23:24 +0000 (15:23 +0200)
src/input/mpegts/dvb_psi_lib.c

index 16859c6c2d2660f874a09428aea0c2112f5af3d9..c3dee5af28bd9bfe05327ba561aca58a4c3e8b11 100644 (file)
@@ -160,15 +160,13 @@ mpegts_psi_section_reassemble
   }
 
   if(pusi) {
-    int len = tsb[off++];
-    if(len > 0) {
-      if(len > 188 - off) {
-        mt->mt_sect.ps_lock = 0;
-        return;
-      }
-      mpegts_psi_section_reassemble0(mt, logprefix, tsb + off, len, 0, crc, cb, opaque);
-      off += len;
+    uint8_t len = tsb[off++];
+    if (len > 188 - off) {
+      mt->mt_sect.ps_lock = 0;
+      return;
     }
+    mpegts_psi_section_reassemble0(mt, logprefix, tsb + off, len, 0, crc, cb, opaque);
+    off += len;
   }
 
   while(off < 188) {
@@ -179,7 +177,6 @@ mpegts_psi_section_reassemble
       break;
     }
     off += r;
-    pusi = 0;
   }
 }