From ade9e3c26d5ff41d29eaa1576219e6257797c97a Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Wed, 16 Apr 2014 19:51:36 +0100 Subject: [PATCH] mpegts: ignore NUL packets early --- src/input/mpegts/mpegts_input.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/input/mpegts/mpegts_input.c b/src/input/mpegts/mpegts_input.c index 7a3a23c9..3129902f 100644 --- a/src/input/mpegts/mpegts_input.c +++ b/src/input/mpegts/mpegts_input.c @@ -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; }