]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
mpegts: ignore NUL packets early
authorAdam Sutton <dev@adamsutton.me.uk>
Wed, 16 Apr 2014 18:51:36 +0000 (19:51 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Wed, 16 Apr 2014 18:51:36 +0000 (19:51 +0100)
src/input/mpegts/mpegts_input.c

index 7a3a23c9b4ee96a5186e836d194efd0e5d827108..3129902f1acc3a5b555b8de26661b7b7ff7c4b54 100644 (file)
@@ -517,6 +517,9 @@ mpegts_input_process
     service_t *s;
     int pid = ((tsb[i+1] & 0x1f) << 8) | tsb[i+2];
 
+    /* Ignore NUL packets */
+    if (pid == 0x1FFF) goto done;
+
     /* Find PID */
     if ((mp = mpegts_mux_find_pid(mm, pid, 0))) {
       // Note: there is a minor danger this caching will get things
@@ -573,6 +576,7 @@ mpegts_input_process
       }
     }
 
+done:
     i   += 188;
     len -= 188;
   }