From: Jaroslav Kysela Date: Mon, 30 Mar 2015 15:03:56 +0000 (+0200) Subject: pid-count.py: improve sync X-Git-Tag: v4.1~188 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e4c8e7314ab090fd0e7f4c48359ef5290109b2d;p=thirdparty%2Ftvheadend.git pid-count.py: improve sync --- diff --git a/support/pid-count.py b/support/pid-count.py index 3c1d79ad9..8e864bf53 100755 --- a/support/pid-count.py +++ b/support/pid-count.py @@ -14,6 +14,9 @@ pids_cc_err = {} fp = open(sys.argv[1]) while True: tsb = fp.read(188) + while tsb and tsb[0] != '\x47': + tsb = tsb[1:] + fp.read(1) + print 'skip1' if len(tsb) < 16: break tsb = map(ord, tsb[:16]) @@ -26,6 +29,8 @@ while True: pids[pid] = 1 else: pids[pid] += 1 + if pid == 0x1fff: + continue cc = tsb[3] if cc & 0x10: cc &= 0x0f